From a50177bf5ca5fa561abc6749713e542b27b3421b Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 23 May 2024 13:53:18 +0700 Subject: [PATCH 01/22] =?UTF-8?q?=E0=B8=A3=E0=B8=B0=E0=B8=9A=E0=B8=9A?= =?UTF-8?q?=E0=B8=9E=E0=B8=B1=E0=B8=92=E0=B8=99=E0=B8=B2=20=3D>=20?= =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=E0=B8=AB=E0=B8=99=E0=B9=89?= =?UTF-8?q?=E0=B8=B2=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1=E0=B9=82?= =?UTF-8?q?=E0=B8=84=E0=B8=A3=E0=B8=87=E0=B8=81=E0=B8=B2=E0=B8=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/15_development/views/MainPage.vue | 75 ++++++++++--------- 1 file changed, 39 insertions(+), 36 deletions(-) diff --git a/src/modules/15_development/views/MainPage.vue b/src/modules/15_development/views/MainPage.vue index 5e4365e88..d958969e2 100644 --- a/src/modules/15_development/views/MainPage.vue +++ b/src/modules/15_development/views/MainPage.vue @@ -549,43 +549,46 @@ onMounted(() => { + + + - - - From 4c01e5aa0d191c070fea27d1feb6652a71efe12c Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Thu, 23 May 2024 16:34:10 +0700 Subject: [PATCH 02/22] fixing submit receive module change send name --- .../components/Receive/AddEmployee/Main.vue | 46 ++++++------------- .../components/Receive/receiveDetail2.vue | 44 +++++++++--------- 2 files changed, 38 insertions(+), 52 deletions(-) diff --git a/src/modules/05_placement/components/Receive/AddEmployee/Main.vue b/src/modules/05_placement/components/Receive/AddEmployee/Main.vue index 276996b98..634ac32be 100644 --- a/src/modules/05_placement/components/Receive/AddEmployee/Main.vue +++ b/src/modules/05_placement/components/Receive/AddEmployee/Main.vue @@ -114,12 +114,11 @@ const fetchPerson = async () => { OpsFilter.value.genderOps = optiongenders; let optionprefixs: DataOption[] = []; - data.prefixs.map((r: DataOptioninfo) => { - optionprefixs.push({ - id: r.id.toString(), - name: r.name.toString(), - }); - }); + optionprefixs = data.prefixs.map((v: any) => ({ + id: v.id, + name: v.name, + })); + Ops.value.prefixOps = optionprefixs; OpsFilter.value.prefixOps = optionprefixs; @@ -302,22 +301,22 @@ const onSubmit = async () => { if (informaData.value.lastName != undefined) formData.append("lastName", informaData.value.lastName); if (informaData.value.genderId != undefined) - formData.append("genderId", informaData.value.genderId); + formData.append("gender", informaData.value.genderId); if (informaData.value.nationality != undefined) formData.append("nationality", informaData.value.nationality); if (informaData.value.ethnicity != undefined) formData.append("race", informaData.value.ethnicity); if (informaData.value.religionId != undefined) - formData.append("religionId", informaData.value.religionId); + formData.append("religion", informaData.value.religionId); if (informaData.value.birthDate != undefined) formData.append( "birthDate", dateToISO(informaData.value.birthDate) ?? dateToISO(new Date()) ); if (informaData.value.bloodId != undefined) - formData.append("bloodGroupId", informaData.value.bloodId); + formData.append("bloodGroup", informaData.value.bloodId); if (informaData.value.statusId != undefined) - formData.append("relationshipId", informaData.value.statusId); + formData.append("relationship", informaData.value.statusId); if (informaData.value.tel != undefined) formData.append("telephoneNumber", informaData.value.tel); if (informaData.value.employeeType != undefined) @@ -348,20 +347,6 @@ const clickBack = () => { router.push("/receive"); }; -function fetchPrefix() { - http - .get(config.API.orgPrefix) - .then((res) => { - prefixOps.value = res.data.result.map((v: any) => ({ - id: v.name, - name: v.name, - })); - }) - .catch((err) => { - messageError($q, err); - }); -} - function calculateAge(birthDate: Date | null) { if (!birthDate) return null; const birthDateTimeStamp = new Date(birthDate).getTime(); @@ -394,7 +379,6 @@ watch( onMounted(async () => { await fetchPerson(); - await fetchPrefix(); }); @@ -749,9 +733,9 @@ onMounted(async () => { dense lazy-rules class="inputgreen" - :options="prefixOps" + :options="Ops.prefixOps" option-label="name" - option-value="id" + option-value="name" map-options hide-bottom-space :rules="[ @@ -857,7 +841,7 @@ onMounted(async () => { hide-bottom-space input-debounce="0" option-label="name" - option-value="id" + option-value="name" v-model="informaData.genderId" class="inputgreen" :options="Ops.genderOps" @@ -877,7 +861,7 @@ onMounted(async () => { emit-value map-options hide-bottom-space - option-value="id" + option-value="name" option-label="name" input-debounce="0" class="inputgreen" @@ -921,7 +905,7 @@ onMounted(async () => { emit-value map-options hide-bottom-space - option-value="id" + option-value="name" option-label="name" input-debounce="0" v-model="informaData.religionId" @@ -943,7 +927,7 @@ onMounted(async () => { emit-value map-options hide-bottom-space - option-value="id" + option-value="name" option-label="name" input-debounce="0" v-model="informaData.bloodId" diff --git a/src/modules/05_placement/components/Receive/receiveDetail2.vue b/src/modules/05_placement/components/Receive/receiveDetail2.vue index 92a2b8d55..92f2fe93f 100644 --- a/src/modules/05_placement/components/Receive/receiveDetail2.vue +++ b/src/modules/05_placement/components/Receive/receiveDetail2.vue @@ -41,8 +41,8 @@ const { dialogConfirm, } = mixin; -const profileStore = useProfileDataStore(); -const { changeRetireText } = profileStore; +// const profileStore = useProfileDataStore(); +// const { changeRetireText } = profileStore; const title = ref({ fullname: "", @@ -132,10 +132,11 @@ const OpsFilter = ref({ ], }); +/*** get รายการข้อมูลเกี่ยวกับบุคคล (dropdown list) */ const fetchPerson = async () => { showLoader(); await http - .get(config.API.person) + .get(config.API.profileNewMetaMain) .then((res) => { const data = res.data.result; let optionbloodGroups: DataOption[] = []; @@ -159,12 +160,11 @@ const fetchPerson = async () => { OpsFilter.value.genderOps = optiongenders; let optionprefixs: DataOption[] = []; - data.prefixs.map((r: DataOptioninfo) => { - optionprefixs.push({ - id: r.id.toString(), - name: r.name.toString(), - }); - }); + optionprefixs = data.prefixs.map((v: any) => ({ + id: v.id, + name: v.name, + })); + Ops.value.prefixOps = optionprefixs; OpsFilter.value.prefixOps = optionprefixs; @@ -189,7 +189,9 @@ const fetchPerson = async () => { OpsFilter.value.religionOps = optionreligions; }) .catch((e: any) => {}) - .finally(() => {}); + .finally(() => { + hideLoader(); + }); }; const getData = async () => { @@ -391,14 +393,14 @@ const calRetire = async (birth: Date) => { .then((res: any) => { const data = res.data.result; informaData.value.age = data.age; - changeRetireText(data.retireDate); + // changeRetireText(data.retireDate); dateBefore.value = birth; }) .catch((e: any) => { messageError($q, e); const retire = new Date(`${birth.getFullYear() + 60}-09-30`); informaData.value.birthDate = dateBefore.value; - changeRetireText(date2Thai(retire)); + // changeRetireText(date2Thai(retire)); }) .finally(() => { hideLoader(); @@ -419,12 +421,12 @@ function saveData() { informaData.value.birthDate !== null ? dateToISO(informaData.value.birthDate) : null, - genderId: informaData.value.genderId, + gender: informaData.value.genderId, nationality: informaData.value.nationality, race: informaData.value.ethnicity, - religionId: informaData.value.religionId, - bloodGroupId: informaData.value.bloodId, - relationshipId: informaData.value.statusId, + religion: informaData.value.religionId, + bloodGroup: informaData.value.bloodId, + relationship: informaData.value.statusId, telephoneNumber: informaData.value.tel, reason: reason.value, educationOld: educationOld.value, @@ -564,7 +566,7 @@ onMounted(async () => { map-options option-label="name" :options="Ops.prefixOps" - option-value="id" + option-value="name" :label="`${'คำนำหน้าชื่อ'}`" use-input input-debounce="0" @@ -673,7 +675,7 @@ onMounted(async () => { map-options option-label="name" :options="Ops.genderOps" - option-value="id" + option-value="name" :label="`${'เพศ'}`" use-input input-debounce="0" @@ -695,7 +697,7 @@ onMounted(async () => { map-options option-label="name" :options="Ops.statusOps" - option-value="id" + option-value="name" :label="`${'สถานภาพ'}`" use-input input-debounce="0" @@ -743,7 +745,7 @@ onMounted(async () => { map-options option-label="name" :options="Ops.religionOps" - option-value="id" + option-value="name" :label="`${'ศาสนา'}`" use-input input-debounce="0" @@ -767,7 +769,7 @@ onMounted(async () => { map-options option-label="name" :options="Ops.bloodOps" - option-value="id" + option-value="name" :label="`${'หมู่เลือด'}`" use-input input-debounce="0" From db18eadc6c6c1c5a8a2165a868a584682db6caa7 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 23 May 2024 16:34:22 +0700 Subject: [PATCH 03/22] =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=E0=B8=A5=E0=B8=B2=E0=B8=AD=E0=B8=AD=E0=B8=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/06_retirement/api.retirement.ts | 19 +- .../components/resign/ResignByid.vue | 757 +++++++++--------- .../06_retirement/interface/response/Main.ts | 27 +- 3 files changed, 415 insertions(+), 388 deletions(-) diff --git a/src/api/06_retirement/api.retirement.ts b/src/api/06_retirement/api.retirement.ts index 7d1b8731d..756927995 100644 --- a/src/api/06_retirement/api.retirement.ts +++ b/src/api/06_retirement/api.retirement.ts @@ -27,14 +27,20 @@ export default { listResign: () => `${retirement}/resign`, resignReport: `${retirement}/resign/report`, resingByid: (id: string) => `${retirement}/resign/${id}`, - resignConfirm: (role: String, id: string) => `${retirement}/resign/${role}/confirm/${id}`, - resignReject: (role: String, id: string) => `${retirement}/resign/${role}/reject/${id}`, + resignConfirm: (role: String, id: string) => + `${retirement}/resign/${role}/confirm/${id}`, + resignReject: (role: String, id: string) => + `${retirement}/resign/${role}/reject/${id}`, listExitInterview: () => `${retirement}/resign/questionnaire`, - commentExitInterview: (id:string) => `${retirement}/resign/questionnaire/comment/${id}`, + commentExitInterview: (id: string) => + `${retirement}/resign/questionnaire/comment/${id}`, questionExitInterview: () => `${retirement}/resign/questionnaire/question`, ExitInterviewByid: (id: string) => `${retirement}/resign/questionnaire/${id}`, ExitInterviewReport: `${retirement}/resign/questionnaire/report`, - AppointInterview: (id: string) => `${retirement}/resign/questionnaire/appoint/${id}`, + AppointInterview: (id: string) => + `${retirement}/resign/questionnaire/appoint/${id}`, + resignConditions: (id: string) => `${retirement}/resign/debt/${id}`, + // ปลดออก retirementDischarge, listDischarge: () => `${retirement}/discharge`, @@ -58,8 +64,5 @@ export default { editDetail: (retireId: string) => `${retirement}/detail/${retireId}`, // ตำถาม Exit interview - questionnaireList: () => `${retirement}/resign/questionnaire/question` - - - + questionnaireList: () => `${retirement}/resign/questionnaire/question`, }; diff --git a/src/modules/06_retirement/components/resign/ResignByid.vue b/src/modules/06_retirement/components/resign/ResignByid.vue index 1b0720fdc..46cfa8e53 100644 --- a/src/modules/06_retirement/components/resign/ResignByid.vue +++ b/src/modules/06_retirement/components/resign/ResignByid.vue @@ -9,6 +9,8 @@ import { useRetirementDataStore } from "@/modules/06_retirement/store"; import CurrencyInput from "@/components/CurruncyInput.vue"; import http from "@/plugins/http"; import config from "@/app.config"; +import axios from "axios"; + import keycloak from "@/plugins/keycloak"; import type { TypeFile, @@ -23,7 +25,6 @@ import type { DataProfile } from "@/modules/05_placement/interface/index/Main"; /** importComponents*/ import CardProfile from "@/components/CardProfile.vue"; -const avatar = ref(""); const modalPersonal = ref(false); const personId = ref(""); /** Use */ @@ -38,7 +39,7 @@ const { showLoader, hideLoader, success, - dialogMessage, + dialogConfirm, dialogRemove, } = mixin; @@ -133,16 +134,21 @@ const checkboxGroup = ref([]); const checkboxOp = ref([ { label: "ไม่เป็นหนี้สหกรณ์", value: "debt" }, ]); + /** Hook */ onMounted(async () => { fetchData(id.value); + fetchFile(); if (keycloak.tokenParsed !== undefined) { const commander = await keycloak.tokenParsed.role.includes("commander"); const oligarch = await keycloak.tokenParsed.role.includes("oligarch"); + const officer = await keycloak.tokenParsed.role.includes("officer"); if (commander) { roleUser.value = "commander"; } else if (oligarch) { roleUser.value = "oligarch"; + } else if (officer) { + roleUser.value = "officer"; } else { roleUser.value = "admin"; } @@ -154,7 +160,6 @@ const diffDate = () => { const time = dateLeave.value.getTime() - date.value.getTime(); //วันที่ขอลาออกจากราชการ - วันที่ยื่นขอลาออกจากราชการ const day = time / (1000 * 3600 * 24); - if (day < 30) { return true; } @@ -163,9 +168,7 @@ const diffDate = () => { return false; }; -/** - * นำข้อมูลมาจาก API - */ +/** นำข้อมูลมาจาก API*/ const fetchData = async (id: string) => { showLoader(); await http @@ -196,7 +199,6 @@ const fetchData = async (id: string) => { location.value = data.location ?? ""; status.value = data.status ?? ""; remarkHorizontal.value = data.remarkHorizontal ?? "-"; - // getAvatar(data.profileId); }) .catch((e) => { messageError($q, e); @@ -206,30 +208,6 @@ const fetchData = async (id: string) => { }); }; -// function getAvatar(id: string) { -// if (id) { -// http -// .get(config.API.profileAvaId(id)) -// .then((res) => { -// console.log(res); -// const dataList = res.data.result; -// avatar.value = dataList.avatar; -// }) -// .catch((e) => {}) -// .finally(() => {}); -// } -// } - -// const downloadFile = (response: any, filename: string) => { -// const link = document.createElement("a"); -// var fileName = filename; -// link.href = window.URL.createObjectURL(new Blob([response.data])); -// link.setAttribute("download", fileName); -// document.body.appendChild(link); -// link.click(); -// document.body.removeChild(link); -// }; - /**Pop up */ const popUp = (action: "pass" | "passNot") => { reasonReign.value = ""; @@ -237,6 +215,7 @@ const popUp = (action: "pass" | "passNot") => { actionPass.value = action === "pass"; openModal(); }; + //เงื่อนไขpop up const conditionPopup = () => { if (myFormConfirm.value !== null) { @@ -311,6 +290,7 @@ const rejectpopUp = async () => { const clickCancel = async () => { await fetchData(id.value); edit.value = false; + myForm.value?.resetValidation(); }; /** * กดยกเลิก @@ -320,86 +300,60 @@ const clickCancelConditions = async () => { conditions.value = false; }; -const saveConditions = () => { - if (myForm.value !== null) { - myForm.value.validate().then((success) => { - if (success) { - dialogConfirm($q, () => { - dataSave(); - }); - // dialogMessage( - // $q, - // "ต้องการแก้ไขข้อมูลหรือไม่?", - // "แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย", - // "mdi-help-circle-outline", - // "ตกลง", - // "public", - // async () => await dataSave(), - // undefined - // ); - } - }); - } +/** Function บันทึก รายการตรวจสอบเงื่อนไขต่าง ๆ*/ +const onSubmitConditions = () => { + dialogConfirm($q, () => { + showLoader(); + http + .put(config.API.resignConditions(id.value), { + IsNoDebt: checkboxGroup.value[0] ? true : false, + }) + .then(() => { + fetchData(id.value); + success($q, "บันทึกเงื่อนไขต่าง ๆ สำเร็จ"); + conditions.value = false; + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + hideLoader(); + }); + }); }; -//Save จาก Api -const dataSave = async () => {}; - -/** - * Functionบันทึก - */ -const conditionSave = () => { - if (myForm.value !== null) { - myForm.value.validate().then((success) => { - if (success) { - dialogConfirm($q, () => { - saveData(); - }); - // dialogMessage( - // $q, - // "ต้องการแก้ไขข้อมูลหรือไม่?", - // "แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย", - // "mdi-help-circle-outline", - // "ตกลง", - // "public", - // async () => , - // undefined - // ); - } - }); - } -}; - -//Save จาก Api -const saveData = async () => { - const formData = new FormData(); - const send = date.value !== null ? new Date(date.value).toUTCString() : ""; - const activeDate = - dateLeave.value !== null ? new Date(dateLeave.value).toUTCString() : ""; - formData.append("Location", location.value); - formData.append("SendDate", send); - formData.append("ActiveDate", activeDate); - formData.append("Reason", reason.value); - formData.append("OrganizationPositionOld", organizationPositionOld.value); - formData.append("PositionTypeOld", positionTypeOld.value); - formData.append("PositionLevelOld", positionLevelOld.value); - formData.append("PositionNumberOld", posNo.value); - formData.append("AmountOld", salary.value.toString()); - formData.append("remarkHorizontal", remarkHorizontal.value); - showLoader(); - await http - .put(config.API.resingByid(id.value), formData) - .then(() => { - success($q, "แก้ไขข้อมูลเพื่อลงบัญชีแนบท้ายสำเร็จ"); - edit.value = false; - }) - .catch((e) => { - messageError($q, e); - }) - .finally(async () => { - await fetchData(id.value); - hideLoader(); - }); +/** Function บันทึก ,แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย*/ +const onSubmitAttached = () => { + dialogConfirm($q, () => { + const formData = new FormData(); + const send = date.value !== null ? new Date(date.value).toUTCString() : ""; + const activeDate = + dateLeave.value !== null ? new Date(dateLeave.value).toUTCString() : ""; + formData.append("Location", location.value); + formData.append("SendDate", send); + formData.append("ActiveDate", activeDate); + formData.append("Reason", reason.value); + formData.append("OrganizationPositionOld", organizationPositionOld.value); + formData.append("PositionTypeOld", positionTypeOld.value); + formData.append("PositionLevelOld", positionLevelOld.value); + formData.append("PositionNumberOld", posNo.value); + formData.append("AmountOld", salary.value.toString()); + formData.append("remarkHorizontal", remarkHorizontal.value); + showLoader(); + http + .put(config.API.resingByid(id.value), formData) + .then(() => { + edit.value = false; + success($q, "บันทึกข้อมูลสำเร็จ"); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(async () => { + await fetchData(id.value); + await hideLoader(); + }); + }); }; /** @@ -464,52 +418,117 @@ function updatemodalPersonal(modal: boolean) { modalPersonal.value = modal; } +async function fetchFile() { + showLoader(); + await http + .get(config.API.file("พ้นจากราชการ", "หลักฐานลาออก", id.value)) + .then((res) => { + fileList.value = res.data; + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); +} + function uploadFiles() { + showLoader(); + http + .post(config.API.file("พ้นจากราชการ", "หลักฐานลาออก", id.value), { + replace: true, + fileList: [ + { + fileName: file.value.name, + }, + ], + }) + .then(async (res) => { + const foundKey: string | undefined = Object.keys(res.data).find( + (key) => + res.data[key]?.fileName !== undefined && + res.data[key]?.fileName !== "" + ); + foundKey && uploadFileURL(res.data[foundKey]?.uploadUrl); + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + hideLoader(); + }); +} + +async function uploadFileURL(uploadUrl: string) { const Data = new FormData(); Data.append("file", file.value); showLoader(); - http - .put(config.API.investigateRelevantUploadFile(id.value), Data) + await axios + .put(uploadUrl, file.value, { + headers: { + "Content-Type": file.value.type, + }, + }) .then(() => { success($q, "อัปโหลดไฟล์สำเร็จ"); + fetchFile(); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + file.value = null; + }); +} + +function downloadFiles(fileName: string) { + showLoader(); + http + .get( + config.API.fileByFile("พ้นจากราชการ", "หลักฐานลาออก", id.value, fileName) + ) + .then((res) => { + const data = res.data.downloadUrl; + window.open(data, "_blank"); }) .catch((e) => { messageError($q, e); }) .finally(async () => { hideLoader(); - file.value = null; }); } -function downloadFiles(link: string) { - window.open(link, "_blank"); -} - /** * ลบไฟล์ * @param id id file */ -function removeFile(id: string) { - dialogRemove($q, () => confirmRemove(id)); -} - -/** - * ยืนยัน ลบ ไฟล์ - * @param id id file - */ -function confirmRemove(fileId: string) { - showLoader(); - http - .delete(config.API.investigateRelevantFileDelete(id.value, fileId)) - .then((res) => { - success($q, `ลบไฟล์สำเร็จ`); - fetchData(id.value); - }) - .catch((e) => { - messageError($q, e); - }) - .finally(() => {}); +function removeFile(fileName: string) { + dialogRemove($q, () => { + showLoader(); + http + .delete( + config.API.fileByFile( + "พ้นจากราชการ", + "หลักฐานลาออก", + id.value, + fileName + ) + ) + .then(() => { + success($q, `ลบไฟล์สำเร็จ`); + setTimeout(() => { + fetchFile(); + hideLoader(); + }, 1000); + }) + .catch((e) => { + messageError($q, e); + hideLoader(); + }); + }); } - + diff --git a/src/style/quasar-variables.sass b/src/style/quasar-variables.sass index 9982869d6..6ba901848 100644 --- a/src/style/quasar-variables.sass +++ b/src/style/quasar-variables.sass @@ -150,16 +150,16 @@ $muti-tab: #87d4cc color: #f00 !important /* registry common style */ -.toggle-borderd - border: 1px solid #ecebeb +.toggle-borderd + border: 1px solid #ecebeb -h3.resigtry-tab-title - font-size: 1.2rem - font-weight: 600 - margin: 0 0 - padding: 0 0 +h3.resigtry-tab-title + font-size: 1.2rem + font-weight: 600 + margin: 0 0 + padding: 0 0 -.q-dialog .q-layout__section--marginal +.q-dialog .q-layout__section--marginal background-color: #fff color: #000 @@ -167,4 +167,10 @@ h3.resigtry-tab-title overflow: hidden .q-card__actions - padding: 4px \ No newline at end of file + padding: 4px + +.select_ellipsis .q-field__native > span + white-space: nowrap + overflow: hidden + text-overflow: ellipsis + width: 200px From 48ef8c19a68a4e1f0828387de38cbf8e270e57f6 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 24 May 2024 17:41:53 +0700 Subject: [PATCH 09/22] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=20fe?= =?UTF-8?q?tch=20profile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Dialogs/PopupPersonalNew.vue | 30 +++++---------------- 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/src/components/Dialogs/PopupPersonalNew.vue b/src/components/Dialogs/PopupPersonalNew.vue index 33182a51f..109ebd3f9 100644 --- a/src/components/Dialogs/PopupPersonalNew.vue +++ b/src/components/Dialogs/PopupPersonalNew.vue @@ -40,16 +40,8 @@ const props = defineProps({ /** emit*/ const emit = defineEmits(["update:modal"]); -/** interface*/ -interface StatusLoad { - val: boolean; - val2: boolean; - val3: boolean; -} - /** ตัวแปร*/ const modal = ref(false); -const statusLoad = ref({ val: false, val2: false, val3: false }); // เช็คสถานะการโหลด const avatar = reactive({ avatar: "", fullname: "", @@ -119,17 +111,14 @@ async function fetchInformation(id: string) { avatar.position = data.position ? data.position : "-"; if (data.avatarName) { - fetchProfile(data.id as string); - } else { - statusLoad.value.val = true; + fetchProfile(data.id as string,data.avatarName); } }) .catch((err) => { messageError($q, err); }) .finally(() => { - statusLoad.value.val2 = true; - loaderFunction(); + hideLoader(); }); } @@ -162,17 +151,10 @@ async function fetchProfileGov(id: string) { messageError($q, err); }) .finally(() => { - statusLoad.value.val3 = true; - loaderFunction(); + hideLoader(); }); } -/** functoion เช็คการโหลดของข้อมูล*/ -function loaderFunction() { - const allTrue = Object.values(statusLoad.value).every((val) => val); - allTrue && hideLoader(); -} - function redirecToRegistry() { router.push(`/registry-new/${props.id}`); modal.value = false; @@ -199,15 +181,15 @@ watch(modal, (newValue) => { } }); -async function fetchProfile(id: string) { +async function fetchProfile(id: string, avatarName: string) { showLoader(); await http - .get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, fileName.value)) + .get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, avatarName)) .then(async (res) => { avatar.avatar = res.data.downloadUrl; }) .finally(() => { - statusLoad.value.val = true; + hideLoader(); }); } From 332a35569e0cec389c6ce246d8f294d25e2846f1 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Fri, 24 May 2024 17:50:43 +0700 Subject: [PATCH 10/22] updated retirement field --- .../04_registry/components/Profile.vue | 10 +- .../04_registryNew/views/detailView.vue | 56 ++++++++++- .../components/AppointEmployee/Detail.vue | 2 +- .../components/AppointMent/Detail.vue | 2 +- .../05_placement/components/Other/Detail.vue | 2 +- .../components/Other/Dialogbody.vue | 2 +- .../05_placement/components/Other/Main.vue | 2 +- .../components/Receive/receiveDetail2.vue | 2 +- .../components/Relocation/RelocationbyId.vue | 4 +- .../components/Repatriate/Dialogbody.vue | 2 +- .../components/Repatriate/RepatriateMain.vue | 2 +- .../components/Repatriate/RepatriatebyId.vue | 2 +- .../components/Transfer/Dialogbody.vue | 2 +- .../components/Transfer/transferMain.vue | 2 +- .../components/Transfer/transferRegistry.vue | 2 +- .../helpgovernment/governmentDetail.vue | 4 +- .../Discharged/dischargedRegistry.vue | 2 +- .../components/DismissOrder/outRegistry.vue | 2 +- .../Expulsion/expulsionRegistry.vue | 2 +- .../components/resign/DialogSendToCommand.vue | 76 +++++++-------- .../components/resign/Resign.vue | 88 +++++++---------- .../components/resign/ResignByid.vue | 96 ++++--------------- 22 files changed, 172 insertions(+), 192 deletions(-) diff --git a/src/modules/04_registry/components/Profile.vue b/src/modules/04_registry/components/Profile.vue index 930e04a59..9b84e9244 100644 --- a/src/modules/04_registry/components/Profile.vue +++ b/src/modules/04_registry/components/Profile.vue @@ -155,7 +155,9 @@
ยืนยันการตรวจสอบข้อมูล (false); +const leaveReason = ref(""); +const reasonOptions = ref([ + { + id: "RETIRE", + name: "เกษียณอายุราชการ", + }, + { + id: "RESIGN", + name: "ลาออก", + }, + { + id: "TRANSFER", + name: "ให้โอน", + }, + { + id: "DEATH", + name: "ถึงแก่กรรม", + }, + { + id: "LAYOFF", + name: "ให้ออก", + }, + { + id: "DISCHARGE", + name: "ปลดออก", + }, + { + id: "DISMISS", + name: "ไล่ออก", + }, + { + id: "OTHER", + name: "อื่นๆ", + }, +]); + async function fetchDataPersonal() { showLoader(); await http .get(config.API.registryNewByProfileId(profileId.value, empType.value)) .then((res) => { formDetail.value = res.data.result; + + if (res.data.result.leaveReason) { + // เหตุผลพ้นจากราชการต่อท้ายชื่อ + const reason = reasonOptions.value.filter( + (r: DataOption) => r.id == res.data.result.leaveReason + ); + if (reason.length > 0) { + leaveReason.value = ` (พ้นจากราชการด้วยสาเหตุ: ${reason[0].name})`; + } else if ( + res.data.result.leaveReason !== null && + res.data.result.leaveReason !== "" + ) { + leaveReason.value = ` (พ้นจากราชการด้วยสาเหตุ: ${res.data.result.leaveReason})`; + } + reasonStatus.value = reason.length > 0 ? true : false; + } + fileName.value = res.data.result.avatarName; if (formDetail.value?.avatarName) { fetchProfile(profileId.value); @@ -593,7 +647,7 @@ onMounted(async () => { v-if="formDetail && formDetail.firstName && formDetail.lastName" > {{ - `${formDetail?.prefix}${formDetail?.firstName} ${formDetail?.lastName}` + `${formDetail?.prefix}${formDetail?.firstName} ${formDetail?.lastName} ${leaveReason}` }}
diff --git a/src/modules/05_placement/components/AppointEmployee/Detail.vue b/src/modules/05_placement/components/AppointEmployee/Detail.vue index c55db3cb5..d46e389a6 100644 --- a/src/modules/05_placement/components/AppointEmployee/Detail.vue +++ b/src/modules/05_placement/components/AppointEmployee/Detail.vue @@ -251,7 +251,7 @@ onMounted(async () => {
-
ตำแหน่งและหน่วยงานเดิม
+
ตำแหน่ง/สังกัดเดิม
diff --git a/src/modules/05_placement/components/AppointMent/Detail.vue b/src/modules/05_placement/components/AppointMent/Detail.vue index 477b3e080..f126e6012 100644 --- a/src/modules/05_placement/components/AppointMent/Detail.vue +++ b/src/modules/05_placement/components/AppointMent/Detail.vue @@ -233,7 +233,7 @@ onMounted(async () => {
-
ตำแหน่งและหน่วยงานเดิม
+
ตำแหน่ง/สังกัดเดิม
diff --git a/src/modules/05_placement/components/Other/Detail.vue b/src/modules/05_placement/components/Other/Detail.vue index 87500223a..8ddfcc6d5 100644 --- a/src/modules/05_placement/components/Other/Detail.vue +++ b/src/modules/05_placement/components/Other/Detail.vue @@ -230,7 +230,7 @@ onMounted(async () => {
-
ตำแหน่งและหน่วยงานเดิม
+
ตำแหน่ง/สังกัดเดิม
([ { name: "organizationPositionOld", align: "left", - label: "ตำแหน่งและหน่วยงานเดิม", + label: "ตำแหน่ง/สังกัดเดิม", sortable: true, field: "organizationPositionOld", headerStyle: "font-size: 14px", diff --git a/src/modules/05_placement/components/Other/Main.vue b/src/modules/05_placement/components/Other/Main.vue index 2a0f44acb..1b5d81286 100644 --- a/src/modules/05_placement/components/Other/Main.vue +++ b/src/modules/05_placement/components/Other/Main.vue @@ -97,7 +97,7 @@ const columns = ref([ { name: "organizationPositionOld", align: "left", - label: "ตำแหน่งและหน่วยงานเดิม", + label: "ตำแหน่ง/สังกัดเดิม", sortable: true, field: "organizationPositionOld", headerStyle: "font-size: 14px", diff --git a/src/modules/05_placement/components/Receive/receiveDetail2.vue b/src/modules/05_placement/components/Receive/receiveDetail2.vue index ae421682b..f636bd112 100644 --- a/src/modules/05_placement/components/Receive/receiveDetail2.vue +++ b/src/modules/05_placement/components/Receive/receiveDetail2.vue @@ -847,7 +847,7 @@ onMounted(async () => { />
-
ตำแหน่งและหน่วยงานเดิม
+
ตำแหน่ง/สังกัดเดิม
{
-
- ตำแหน่งและหน่วยงานเดิม -
+
ตำแหน่ง/สังกัดเดิม
([ { name: "organizationPositionOld", align: "left", - label: "ตำแหน่งและหน่วยงานเดิม", + label: "ตำแหน่ง/สังกัดเดิม", sortable: true, field: "organizationPositionOld", headerStyle: "font-size: 14px", diff --git a/src/modules/05_placement/components/Repatriate/RepatriateMain.vue b/src/modules/05_placement/components/Repatriate/RepatriateMain.vue index 6776f0b5c..800b9335d 100644 --- a/src/modules/05_placement/components/Repatriate/RepatriateMain.vue +++ b/src/modules/05_placement/components/Repatriate/RepatriateMain.vue @@ -91,7 +91,7 @@ const columns = ref([ { name: "organizationPositionOld", align: "left", - label: "ตำแหน่งและหน่วยงานเดิม", + label: "ตำแหน่ง/สังกัดเดิม", sortable: true, field: "organizationPositionOld", headerStyle: "font-size: 14px", diff --git a/src/modules/05_placement/components/Repatriate/RepatriatebyId.vue b/src/modules/05_placement/components/Repatriate/RepatriatebyId.vue index 422337586..7472d9473 100644 --- a/src/modules/05_placement/components/Repatriate/RepatriatebyId.vue +++ b/src/modules/05_placement/components/Repatriate/RepatriatebyId.vue @@ -203,7 +203,7 @@ onMounted(() => {
-
ตำแหน่งและหน่วยงานเดิม
+
ตำแหน่ง/สังกัดเดิม
([ { name: "organizationPositionOld", align: "left", - label: "ตำแหน่งและหน่วยงานเดิม", + label: "ตำแหน่ง/สังกัดเดิม", sortable: true, field: "organizationPositionOld", headerStyle: "font-size: 14px", diff --git a/src/modules/05_placement/components/Transfer/transferMain.vue b/src/modules/05_placement/components/Transfer/transferMain.vue index 4b6a33823..81b979ba4 100644 --- a/src/modules/05_placement/components/Transfer/transferMain.vue +++ b/src/modules/05_placement/components/Transfer/transferMain.vue @@ -84,7 +84,7 @@ const columns = ref([ { name: "organizationPositionOld", align: "left", - label: "ตำแหน่งและหน่วยงานเดิม", + label: "ตำแหน่ง/สังกัดเดิม", sortable: true, field: "organizationPositionOld", headerStyle: "font-size: 14px", diff --git a/src/modules/05_placement/components/Transfer/transferRegistry.vue b/src/modules/05_placement/components/Transfer/transferRegistry.vue index 7ed570b08..7d54910cd 100644 --- a/src/modules/05_placement/components/Transfer/transferRegistry.vue +++ b/src/modules/05_placement/components/Transfer/transferRegistry.vue @@ -555,7 +555,7 @@ onMounted(async () => {
-
ตำแหน่งและหน่วยงานเดิม
+
ตำแหน่ง/สังกัดเดิม
(); const fullname = ref(""); /** form แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย*/ -const organizationPositionOld = ref(""); //ตำแหน่งและหน่วยงานเดิม +const organizationPositionOld = ref(""); //ตำแหน่ง/สังกัดเดิม const organization = ref(""); //หน่วยงานเดิม const dateStart = ref(null); //ตั้งแต่วันที่ const dateEnd = ref(null); // ถึงวันที่ @@ -196,7 +196,7 @@ onMounted(() => {
-
ตำแหน่งและหน่วยงานเดิม
+
ตำแหน่ง/สังกัดเดิม
-
ตำแหน่งและหน่วยงานเดิม
+
ตำแหน่ง/สังกัดเดิม
{
-
ตำแหน่งและหน่วยงานเดิม
+
ตำแหน่ง/สังกัดเดิม
-
ตำแหน่งและหน่วยงานเดิม
+
ตำแหน่ง/สังกัดเดิม
([ sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, - { - name: "positionTypeOld", + name: "location", align: "left", - label: "ตำแหน่งในสายงาน", + label: "สถานที่ยื่นขอลาออกจากราชการ", sortable: true, - field: "positionTypeOld", + field: "location", headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "positionLevelOld", + name: "positionLevel", align: "left", - label: "ระดับ", + label: "ประเภทตำแหน่ง", sortable: true, - field: "positionLevelOld", + field: "positionLevel", headerStyle: "font-size: 14px", style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + format(val, row) { + let name = ""; + if (row.positionTypeOld && row.positionLevelOld) { + name = `${row.positionTypeOld} (${row.positionLevelOld})`; + } else if (row.positionTypeOld) { + name = `${row.positionTypeOld}`; + } else if (row.positionLevelOld) { + name = `(${row.positionLevelOld})`; + } else name = "-"; + return name; + }, }, { name: "positionNumberOld", @@ -77,7 +85,7 @@ const columns2 = ref([ { name: "organizationPositionOld", align: "left", - label: "สังกัด", + label: "ตำแหน่ง/สังกัดเดิม", sortable: true, field: "organizationPositionOld", headerStyle: "font-size: 14px", @@ -113,9 +121,10 @@ const columns2 = ref([ /** คอลัมน์ที่แสดง */ const visibleColumns2 = ref([ "no", + "prefix", "fullname", - "positionTypeOld", - "positionLevelOld", + "location", + "positionLevel", "positionNumberOld", "organizationPositionOld", "datetext", @@ -268,35 +277,22 @@ watchEffect(() => { v-model="props.selected" /> - - {{ props.rowIndex + 1 }} - - - {{ props.row.prefix }} - - - {{ props.row.fullname }} - - - {{ props.row.positionTypeOld }} - - - {{ props.row.positionLevelOld }} - - - {{ props.row.positionNumberOld }} - - - -
- {{ props.row.organizationPositionOld }} + +
+ {{ props.rowIndex + 1 }} +
+ +
+ {{ col.value ? col.value : "-" }}
-
- - {{ props.row.datetext }} - - - {{ props.row.statustext }} diff --git a/src/modules/06_retirement/components/resign/Resign.vue b/src/modules/06_retirement/components/resign/Resign.vue index 42c9c0ae8..eca3f34f5 100644 --- a/src/modules/06_retirement/components/resign/Resign.vue +++ b/src/modules/06_retirement/components/resign/Resign.vue @@ -55,26 +55,24 @@ const columns = ref([ a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "positionTypeOld", + name: "positionLevel", align: "left", - label: "ตำแหน่งในสายงาน", + label: "ประเภทตำแหน่ง", sortable: true, - field: "positionTypeOld", + field: "positionLevel", headerStyle: "font-size: 14px", style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - { - name: "positionLevelOld", - align: "left", - label: "ระดับ", - sortable: true, - field: "positionLevelOld", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + format(val, row) { + let name = ""; + if (row.positionTypeOld && row.positionLevelOld) { + name = `${row.positionTypeOld} (${row.positionLevelOld})`; + } else if (row.positionTypeOld) { + name = `${row.positionTypeOld}`; + } else if (row.positionLevelOld) { + name = `(${row.positionLevelOld})`; + } else name = "-"; + return name; + }, }, { name: "positionNumberOld", @@ -90,7 +88,7 @@ const columns = ref([ { name: "organizationPositionOld", align: "left", - label: "สังกัด", + label: "ตำแหน่ง/สังกัดเดิม", sortable: true, field: "organizationPositionOld", headerStyle: "font-size: 14px", @@ -129,8 +127,7 @@ const visibleColumns = ref([ "prefix", "fullname", "location", - "positionTypeOld", - "positionLevelOld", + "positionLevel", "positionNumberOld", "organizationPositionOld", "datetext", @@ -310,40 +307,27 @@ const pagination = ref({ diff --git a/src/modules/06_retirement/components/resign/ResignByid.vue b/src/modules/06_retirement/components/resign/ResignByid.vue index 09228ec13..e1ed611fe 100644 --- a/src/modules/06_retirement/components/resign/ResignByid.vue +++ b/src/modules/06_retirement/components/resign/ResignByid.vue @@ -6,7 +6,6 @@ import DialogFooter from "@/modules/05_placement/components/PersonalList/DialogF import DialogHeader from "@/modules/05_placement/components/PersonalList/DialogHeader.vue"; import { useCounterMixin } from "@/stores/mixin"; import { useRetirementDataStore } from "@/modules/06_retirement/store"; -import CurrencyInput from "@/components/CurruncyInput.vue"; import http from "@/plugins/http"; import config from "@/app.config"; import axios from "axios"; @@ -306,7 +305,7 @@ const onSubmitConditions = () => { showLoader(); http .put(config.API.resignConditions(id.value), { - IsNoDebt: checkboxGroup.value[0] ? true : false, + isNoDebt: checkboxGroup.value[0] ? true : false, }) .then(() => { fetchData(id.value); @@ -549,65 +548,6 @@ function removeFile(fileName: string) { - -
ข้อมูลการลาออก
@@ -615,14 +555,14 @@ function removeFile(fileName: string) {
@@ -1139,9 +1079,9 @@ function removeFile(fileName: string) { :readonly="!edit" :borderless="!edit" v-model="positionTypeOld" - :rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]" + :rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]" hide-bottom-space - :label="`${'ประเภทตำแหน่ง'}`" + :label="`${'ตำแหน่งประเภท'}`" />
@@ -1155,9 +1095,9 @@ function removeFile(fileName: string) { :readonly="!edit" :borderless="!edit" v-model="positionLevelOld" - :rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]" + :rules="[(val) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]" hide-bottom-space - :label="`${'ระดับ'}`" + :label="`${'ระดับตำแหน่ง'}`" />
@@ -1179,13 +1119,19 @@ function removeFile(fileName: string) {
-
From bf84ecda8a0b69890adb89f342837badc0a7dc8c Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 24 May 2024 17:52:20 +0700 Subject: [PATCH 11/22] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=20re?= =?UTF-8?q?dilect=20Dialog=20profile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Dialogs/PopupPersonalNew.vue | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/Dialogs/PopupPersonalNew.vue b/src/components/Dialogs/PopupPersonalNew.vue index 109ebd3f9..70a35f1b9 100644 --- a/src/components/Dialogs/PopupPersonalNew.vue +++ b/src/components/Dialogs/PopupPersonalNew.vue @@ -20,7 +20,6 @@ const router = useRouter(); const $q = useQuasar(); const retireDate = ref(); const { showLoader, hideLoader, messageError, date2Thai } = mixin; -const fileName = ref(""); const empType = ref( route.name !== "appoint-employee-detail" ? "" : "-employee" ); @@ -111,7 +110,7 @@ async function fetchInformation(id: string) { avatar.position = data.position ? data.position : "-"; if (data.avatarName) { - fetchProfile(data.id as string,data.avatarName); + fetchProfile(data.id as string, data.avatarName); } }) .catch((err) => { @@ -156,7 +155,7 @@ async function fetchProfileGov(id: string) { } function redirecToRegistry() { - router.push(`/registry-new/${props.id}`); + router.push(`/registry-new${empType.value}/${props.id}`); modal.value = false; } @@ -168,8 +167,6 @@ watch( if (props.id) { fetchInformation(props.id); fetchProfileGov(props.id); - fileName.value = `profile-${props.id}`; - // fetchProfile(props.id as string); } } } From fce4bb8a2d57e43aaafd109b4b3671bda7f528b6 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Fri, 24 May 2024 18:06:05 +0700 Subject: [PATCH 12/22] updated --- .../DismissOrder/DialogSendToCommand.vue | 46 +++++++++---------- .../components/DismissOrder/DismissOrder.vue | 35 +++++--------- 2 files changed, 33 insertions(+), 48 deletions(-) diff --git a/src/modules/06_retirement/components/DismissOrder/DialogSendToCommand.vue b/src/modules/06_retirement/components/DismissOrder/DialogSendToCommand.vue index 44cc2c50f..b29376e1c 100644 --- a/src/modules/06_retirement/components/DismissOrder/DialogSendToCommand.vue +++ b/src/modules/06_retirement/components/DismissOrder/DialogSendToCommand.vue @@ -20,7 +20,7 @@ const { messageError, dialogConfirm, hideLoader, - findOrgName, + date2Thai, } = mixin; /** คอลัมน์ */ @@ -46,15 +46,6 @@ const columns2 = ref([ return `${row.prefix}${row.firstName} ${row.lastName}`; }, }, - { - name: "position", - align: "left", - label: "ตำแหน่งในสายงาน", - sortable: true, - field: "position", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, { name: "positionLevel", align: "left", @@ -65,27 +56,34 @@ const columns2 = ref([ style: "font-size: 14px", format(val, row) { let name = ""; - if (row.posTypeName && row.posLevelName) { - name = `${row.posTypeName} (${row.posLevelName})`; - } else if (row.posTypeName) { - name = `${row.posTypeName}`; - } else if (row.posLevelName) { - name = `(${row.posLevelName})`; + if (row.positionTypeOld && row.positionLevelOld) { + name = `${row.positionTypeOld} (${row.positionLevelOld})`; + } else if (row.positionTypeOld) { + name = `${row.positionTypeOld}`; + } else if (row.positionLevelOld) { + name = `(${row.positionLevelOld})`; } else name = "-"; return name; }, }, { - name: "org", + name: "organizationPositionOld", align: "left", - label: "สังกัด", + label: "ตำแหน่ง/สังกัดเดิม", sortable: true, - field: "org", + field: "organizationPositionOld", headerStyle: "font-size: 14px", style: "font-size: 14px", - format(val, row) { - return findOrgName(row); - }, + }, + { + name: "createdAt", + align: "left", + label: "วันที่ดำเนินการ", + sortable: true, + field: "createdAt", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format: (val) => date2Thai(val), }, { name: "status", @@ -103,9 +101,9 @@ const columns2 = ref([ const visibleColumns2 = ref([ "no", "fullname", - "position", "positionLevel", - "org", + "organizationPositionOld", + "createdAt", "status", ]); diff --git a/src/modules/06_retirement/components/DismissOrder/DismissOrder.vue b/src/modules/06_retirement/components/DismissOrder/DismissOrder.vue index 49e0e64a6..698dce91b 100644 --- a/src/modules/06_retirement/components/DismissOrder/DismissOrder.vue +++ b/src/modules/06_retirement/components/DismissOrder/DismissOrder.vue @@ -22,7 +22,7 @@ const { hideLoader, success, dialogMessage, - findOrgName, + findOrgNameOld, } = mixin; const { statusText } = transferStore; const modal = ref(false); @@ -31,9 +31,8 @@ const modal = ref(false); const visibleColumns = ref([ "no", "fullname", - "position", "positionLevel", - "org", + "organizationPositionOld", "createdAt", "status", ]); @@ -69,15 +68,6 @@ const columns = ref([ return `${row.prefix}${row.firstName} ${row.lastName}`; }, }, - { - name: "position", - align: "left", - label: "ตำแหน่งในสายงาน", - sortable: true, - field: "position", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, { name: "positionLevel", align: "left", @@ -88,27 +78,24 @@ const columns = ref([ style: "font-size: 14px", format(val, row) { let name = ""; - if (row.posTypeName && row.posLevelName) { - name = `${row.posTypeName} (${row.posLevelName})`; - } else if (row.posTypeName) { - name = `${row.posTypeName}`; - } else if (row.posLevelName) { - name = `(${row.posLevelName})`; + if (row.positionTypeOld && row.positionLevelOld) { + name = `${row.positionTypeOld} (${row.positionLevelOld})`; + } else if (row.positionTypeOld) { + name = `${row.positionTypeOld}`; + } else if (row.positionLevelOld) { + name = `(${row.positionLevelOld})`; } else name = "-"; return name; }, }, { - name: "org", + name: "organizationPositionOld", align: "left", - label: "สังกัด", + label: "ตำแหน่ง/สังกัดเดิม", sortable: true, - field: "org", + field: "organizationPositionOld", headerStyle: "font-size: 14px", style: "font-size: 14px", - format(val, row) { - return findOrgName(row); - }, }, { name: "createdAt", From ef0bcc7e4dee04e0aab998251188967de85a3c6e Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 27 May 2024 09:55:39 +0700 Subject: [PATCH 13/22] =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=E0=B8=A5=E0=B8=B2=E0=B8=AD=E0=B8=AD=E0=B8=81?= =?UTF-8?q?=20=3D>=20=E0=B9=80=E0=B8=87=E0=B8=B7=E0=B9=88=E0=B8=AD?= =?UTF-8?q?=E0=B8=99=E0=B9=84=E0=B8=82=E0=B8=95=E0=B9=88=E0=B8=B2=E0=B8=87?= =?UTF-8?q?=20=E0=B9=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/resign/ResignByid.vue | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/modules/06_retirement/components/resign/ResignByid.vue b/src/modules/06_retirement/components/resign/ResignByid.vue index e1ed611fe..631f6574b 100644 --- a/src/modules/06_retirement/components/resign/ResignByid.vue +++ b/src/modules/06_retirement/components/resign/ResignByid.vue @@ -129,6 +129,7 @@ const openModal = () => (modal.value = true); const file = ref(null); const fileList = ref([]); +const isNoDebt = ref(false); const checkboxGroup = ref([]); const checkboxOp = ref([ { label: "ไม่เป็นหนี้สหกรณ์", value: "debt" }, @@ -187,6 +188,7 @@ const fetchData = async (id: string) => { } rows.value = list; dataDetail.value = data; + organizationPositionOld.value = data.organizationPositionOld ?? ""; positionTypeOld.value = data.positionTypeOld ?? ""; positionLevelOld.value = data.positionLevelOld ?? ""; @@ -198,6 +200,7 @@ const fetchData = async (id: string) => { location.value = data.location ?? ""; status.value = data.status ?? ""; remarkHorizontal.value = data.remarkHorizontal ?? "-"; + isNoDebt.value = data.isNoDebt; }) .catch((e) => { messageError($q, e); @@ -305,7 +308,7 @@ const onSubmitConditions = () => { showLoader(); http .put(config.API.resignConditions(id.value), { - isNoDebt: checkboxGroup.value[0] ? true : false, + isNoDebt: isNoDebt.value, }) .then(() => { fetchData(id.value); @@ -774,13 +777,18 @@ function removeFile(fileName: string) {
- - +
From ead02a85dd7babe3f7fc41fae3bef289441eff57 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Mon, 27 May 2024 10:49:57 +0700 Subject: [PATCH 14/22] =?UTF-8?q?=E0=B9=80=E0=B8=81=E0=B8=A9=E0=B8=B5?= =?UTF-8?q?=E0=B8=A2=E0=B8=93=E0=B8=94=E0=B8=B6=E0=B8=87=E0=B8=82=E0=B9=89?= =?UTF-8?q?=E0=B8=AD=E0=B8=A1=E0=B8=B9=E0=B8=A5=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=9B=E0=B8=A3=E0=B8=B0?= =?UTF-8?q?=E0=B8=A7=E0=B8=B1=E0=B8=95=E0=B8=B4=E0=B9=83=E0=B8=AB=E0=B8=A1?= =?UTF-8?q?=E0=B9=88,=20=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=82=E0=B9=89?= =?UTF-8?q?=E0=B8=AD=E0=B8=84=E0=B8=A7=E0=B8=B2=E0=B8=A1=20label=20?= =?UTF-8?q?=E0=B9=80=E0=B8=87=E0=B8=B4=E0=B8=99=E0=B9=80=E0=B8=94=E0=B8=B7?= =?UTF-8?q?=E0=B8=AD=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ListRetirement/AddList.vue | 99 ++++++++++++------- .../components/ListRetirement/TableList.vue | 2 +- .../SalaryEmployeeLists/DialogMoveLevel.vue | 2 +- .../SalaryLists/DialogMoveLevel.vue | 2 +- .../store/SalaryEmployeeListsStore.ts | 2 +- .../13_salary/store/SalaryListsStore.ts | 2 +- 6 files changed, 67 insertions(+), 42 deletions(-) diff --git a/src/modules/06_retirement/components/ListRetirement/AddList.vue b/src/modules/06_retirement/components/ListRetirement/AddList.vue index 6a440ba58..cac1f34d0 100644 --- a/src/modules/06_retirement/components/ListRetirement/AddList.vue +++ b/src/modules/06_retirement/components/ListRetirement/AddList.vue @@ -1,5 +1,5 @@ + + + + From ba728ea0006f319188d08edf16d71cd23a00bd3f Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Tue, 28 May 2024 15:41:15 +0700 Subject: [PATCH 19/22] =?UTF-8?q?fixing=20=E0=B8=A3=E0=B8=B0=E0=B8=9A?= =?UTF-8?q?=E0=B8=9A=E0=B8=A7=E0=B8=B4=E0=B8=99=E0=B8=B1=E0=B8=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Dialogs/AddPersonal.vue | 20 ++ .../05_placement/interface/index/Main.ts | 2 + .../1_Complaint/AddComplaintPage.vue | 42 +---- .../components/1_Complaint/EditPage.vue | 49 +---- .../components/1_Complaint/Form.vue | 153 ++++++++------- .../2_InvestigateFacts/EditPage.vue | 45 +---- .../components/2_InvestigateFacts/Form.vue | 58 +++--- .../3_InvestigateDisciplinary/EditPage.vue | 44 +---- .../3_InvestigateDisciplinary/Form.vue | 85 +++------ .../components/4_Result/Form.vue | 6 +- .../components/7_ListSuspend/DetailPage.vue | 175 +++++++++++------- .../interface/request/complaint.ts | 111 +++++------ .../interface/response/suspend.ts | 17 ++ src/modules/11_discipline/store/main.ts | 22 ++- .../13_salary/interface/request/SalaryList.ts | 3 + .../interface/response/SalaryList.ts | 1 + 16 files changed, 391 insertions(+), 442 deletions(-) diff --git a/src/components/Dialogs/AddPersonal.vue b/src/components/Dialogs/AddPersonal.vue index fb39e19e3..1613ddf08 100644 --- a/src/components/Dialogs/AddPersonal.vue +++ b/src/components/Dialogs/AddPersonal.vue @@ -135,6 +135,26 @@ async function searchInput() { organization: e.organization ?? "-", phone: e.phone ?? "-", email: e.email ?? "-", + root: e.root, + rootId: e.rootId, + rootShortName: e.rootShortName, + child1: e.child1, + child1Id: e.child1Id, + child1ShortName: e.child1ShortName, + child2: e.child2, + child2Id: e.child2Id, + child2ShortName: e.child2ShortName, + child3: e.child3, + child3Id: e.child3Id, + child3ShortName: e.child3ShortName, + child4: e.child4, + child4Id: e.child4Id, + child4ShortName: e.child4ShortName, + posMasterNo: e.posMasterNo, + posTypeId: e.posTypeId, + posTypeName: e.posTypeName, + posLevelId: e.posLevelId, + posLevelName: e.posLevelName, })); rows.value = list; diff --git a/src/modules/05_placement/interface/index/Main.ts b/src/modules/05_placement/interface/index/Main.ts index 4a1fe4697..28b96fd29 100644 --- a/src/modules/05_placement/interface/index/Main.ts +++ b/src/modules/05_placement/interface/index/Main.ts @@ -255,6 +255,8 @@ interface DataProfile { rootOld?: string; rootShortNameOld?: string | null; status: string; + positionType?: string; + positionLevel?: string; } export type { DataOption, diff --git a/src/modules/11_discipline/components/1_Complaint/AddComplaintPage.vue b/src/modules/11_discipline/components/1_Complaint/AddComplaintPage.vue index 3c49bc768..2c367efc3 100644 --- a/src/modules/11_discipline/components/1_Complaint/AddComplaintPage.vue +++ b/src/modules/11_discipline/components/1_Complaint/AddComplaintPage.vue @@ -18,46 +18,7 @@ async function onSubmit(data: any) { /** post */ showLoader(); http - .post(config.API.complaintAdd(), { - id: data.id, - respondentType: data.respondentType, - organizationId: data.organizationId, - consideredAgency: data.consideredAgency, - title: data.title, - description: data.description, - dateReceived: data.dateReceived, - dateConsideration: data.dateConsideration, - offenseDetails: data.offenseDetails, - levelConsideration: data.levelConsideration, - dateNotification: data.dateNotification, - complaintFrom: data.complaintFrom, - appellant: data.appellant, - documentFile: data.documentFile, - status: data.status, - result: data.result, - persons: data.persons.map((item: any) => ({ - personId: item.personId, - idcard: item.idcard, - prefix: item.prefix, - firstName: item.firstName, - lastName: item.lastName, - name: item.name, - posNo: item.posNo === "-" ? null : item.posNo, - position: item.position, - positionLevel: item.positionLevel, - salary: item.salary === "-" ? null : item.salary, - organization: item.organization, - phone: item.phone === "-" ? null : item.phone, - email: item.email, - })), - disciplineComplaintDocs: data.disciplineComplaintDocs.map( - (file: any) => ({ - id: file.id, - fileName: file.fileName, - pathName: file.pathName, - }) - ), - }) + .post(config.API.complaintAdd(), data) .then((res) => { success($q, "บันทึกข้อมูลสำเร็จ"); router.push(`/discipline/complaints/${res.data.result}`); @@ -70,6 +31,7 @@ async function onSubmit(data: any) { }); } +