From f9ac5b015f27c306492c79bca0f6b362faec5ce5 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 30 May 2025 14:17:51 +0700 Subject: [PATCH 1/4] =?UTF-8?q?fix=20=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1?= =?UTF-8?q?=E0=B8=B9=E0=B8=A5=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=A5=E0=B8=B2?= =?UTF-8?q?=20=E0=B9=80=E0=B8=A5=E0=B8=B7=E0=B8=AD=E0=B8=81=E0=B8=9C?= =?UTF-8?q?=E0=B8=B9=E0=B9=89=E0=B8=9A=E0=B8=B1=E0=B8=87=E0=B8=84=E0=B8=B1?= =?UTF-8?q?=E0=B8=9A=E0=B8=9A=E0=B8=B1=E0=B8=8D=E0=B8=8A=E0=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../05_leave/components/FormLeave/Form.vue | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/modules/05_leave/components/FormLeave/Form.vue b/src/modules/05_leave/components/FormLeave/Form.vue index 36cd08d..ac50dc6 100644 --- a/src/modules/05_leave/components/FormLeave/Form.vue +++ b/src/modules/05_leave/components/FormLeave/Form.vue @@ -87,11 +87,14 @@ function onSubmit() { function closeDialog() { modal.value = false; + search.value = ""; + rows.value = []; + selected.value = []; } -function getCommander() { +async function getCommander() { showLoader(); - http + await http .put(config.API.commanderPosexe("operate"), { isAct: isAct.value, keyword: search.value, @@ -104,7 +107,6 @@ function getCommander() { }) .catch((e) => { messageError($q, e); - hideLoader(); }) .finally(() => { hideLoader(); @@ -313,6 +315,7 @@ onMounted(() => { hide-bottom-space dense label="คำค้น" + @keydown.enter.prevent="getSearch()" /> { label="ค้นหา" class="full-width q-pa-sm" outline - @click.prevent="getCommander" + @click.prevent="getSearch()" > @@ -423,9 +426,14 @@ onMounted(() => { - บันทึกข้อมูล + บันทึกข้อมูล + From 7e2132f45f5fa7c52f63431b70f71c15fc0552eb Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Fri, 30 May 2025 14:21:29 +0700 Subject: [PATCH 2/4] check space report --- .../components/ExpertPageDetail.vue | 292 +++++++++--------- 1 file changed, 154 insertions(+), 138 deletions(-) diff --git a/src/modules/06_evaluate/components/ExpertPageDetail.vue b/src/modules/06_evaluate/components/ExpertPageDetail.vue index 070a51b..c722a0a 100644 --- a/src/modules/06_evaluate/components/ExpertPageDetail.vue +++ b/src/modules/06_evaluate/components/ExpertPageDetail.vue @@ -181,150 +181,150 @@ async function onClickDowloadFile( fileName: string ) { showLoader(); - let educations: any = []; - if (profile.value != null) { - profile.value.educations.map((e: any) => { - educations.push({ - educationLevel: e.educationLevel ?? "", - finishYear: - e.finishDate == null - ? "" - : new Date(e.finishDate).getFullYear() + 543, - institute: e.institute ?? "", - }); - }); - } - let certificates: any = []; - if (profile.value != null) { - profile.value.certificates.map((e: any) => { - certificates.push({ - certificateNo: e.certificateNo ?? "", - certificateType: e.certificateType ?? "", - issuer: e.issuer ?? "", - }); - }); - } - let salaries: any = []; - if (profile.value != null) { - profile.value.salaries.map((e: any) => { - salaries.push({ - date: e.date == null ? "" : date2Thai(new Date(e.date)), - position: e.position ?? "", - amount: e.amount ?? "", - }); - }); - } - let trainings: any = []; - if (profile.value != null) { - profile.value.trainings.map((e: any) => { - trainings.push({ - yearly: e.yearly ?? "", - startDate: e.startDate == null ? "" : date2Thai(new Date(e.startDate)), - endDate: e.endDate == null ? "" : date2Thai(new Date(e.endDate)), - name: e.name ?? "", - topic: e.topic ?? "", - }); - }); - } - const data = Object.assign( - { educations: educations }, - { certificates: certificates }, - { salaries: salaries }, - { trainings: trainings }, - { - fullName: dataPerson.formData.firstName - ? `${dataPerson.formData.prefix}${dataPerson.formData.firstName} ${dataPerson.formData.lastName}` - : "", - }, - { - position: dataPerson.formData.position - ? dataPerson.formData.position - : "", - }, - { - positionLevel: dataPerson.formData.posLevelName - ? dataPerson.formData.posLevelName - : "", - }, - { posNo: dataPerson.formData.posNo ? dataPerson.formData.posNo : "" }, - { org: dataPerson.formData ? dataPerson.formData.org : "" }, - { - birthDate: dataPerson.formData.birthDate - ? date2Thai(new Date(dataPerson.formData.birthDate)) - : "", - }, - { - govAge: profile.value.government - ? `${ - profile.value.government.govAge.year !== 0 - ? `${profile.value.government.govAge.year} ปี` - : "" - } ${ - profile.value.government.govAge.month !== 0 - ? `${profile.value.government.govAge.month} เดือน` - : "" - } ${ - profile.value.government.govAge.day !== 0 - ? `${profile.value.government.govAge.day} วัน` - : "" - }` - : ``, - }, - { - positionLevelNew: - profile.value == null - ? "" - : profile.value.type == "EXPERT" - ? "ชำนาญการ" - : "ชำนาญการพิเศษ", - }, + // let educations: any = []; + // if (profile.value != null) { + // profile.value.educations.map((e: any) => { + // educations.push({ + // educationLevel: e.educationLevel ?? "", + // finishYear: + // e.finishDate == null + // ? "" + // : new Date(e.finishDate).getFullYear() + 543, + // institute: e.institute ?? "", + // }); + // }); + // } + // let certificates: any = []; + // if (profile.value != null) { + // profile.value.certificates.map((e: any) => { + // certificates.push({ + // certificateNo: e.certificateNo ?? "", + // certificateType: e.certificateType ?? "", + // issuer: e.issuer ?? "", + // }); + // }); + // } + // let salaries: any = []; + // if (profile.value != null) { + // profile.value.salaries.map((e: any) => { + // salaries.push({ + // date: e.date == null ? "" : date2Thai(new Date(e.date)), + // position: e.position ?? "", + // amount: e.amount ?? "", + // }); + // }); + // } + // let trainings: any = []; + // if (profile.value != null) { + // profile.value.trainings.map((e: any) => { + // trainings.push({ + // yearly: e.yearly ?? "", + // startDate: e.startDate == null ? "" : date2Thai(new Date(e.startDate)), + // endDate: e.endDate == null ? "" : date2Thai(new Date(e.endDate)), + // name: e.name ?? "", + // topic: e.topic ?? "", + // }); + // }); + // } + // const data = Object.assign( + // { educations: educations }, + // { certificates: certificates }, + // { salaries: salaries }, + // { trainings: trainings }, + // { + // fullName: dataPerson.formData.firstName + // ? `${dataPerson.formData.prefix}${dataPerson.formData.firstName} ${dataPerson.formData.lastName}` + // : "", + // }, + // { + // position: dataPerson.formData.position + // ? dataPerson.formData.position + // : "", + // }, + // { + // positionLevel: dataPerson.formData.posLevelName + // ? dataPerson.formData.posLevelName + // : "", + // }, + // { posNo: dataPerson.formData.posNo ? dataPerson.formData.posNo : "" }, + // { org: dataPerson.formData ? dataPerson.formData.org : "" }, + // { + // birthDate: dataPerson.formData.birthDate + // ? date2Thai(new Date(dataPerson.formData.birthDate)) + // : "", + // }, + // { + // govAge: profile.value.government + // ? `${ + // profile.value.government.govAge.year !== 0 + // ? `${profile.value.government.govAge.year} ปี` + // : "" + // } ${ + // profile.value.government.govAge.month !== 0 + // ? `${profile.value.government.govAge.month} เดือน` + // : "" + // } ${ + // profile.value.government.govAge.day !== 0 + // ? `${profile.value.government.govAge.day} วัน` + // : "" + // }` + // : ``, + // }, + // { + // positionLevelNew: + // profile.value == null + // ? "" + // : profile.value.type == "EXPERT" + // ? "ชำนาญการ" + // : "ชำนาญการพิเศษ", + // }, - tp === "EV1_005" - ? { salary: dataPerson.formData.salary ? dataPerson.formData.salary : "" } - : null, + // tp === "EV1_005" + // ? { salary: dataPerson.formData.salary ? dataPerson.formData.salary : "" } + // : null, - tp === "EV1_006" - ? { - years: { - lastTwoYear: toThaiNumber(currentYear - 2 + 543), - lastOneYear: toThaiNumber(currentYear - 1 + 543), - currentYear: toThaiNumber(currentYear + 543), - }, - } - : null, - tp === "EV1_006" || tp === "EV1_008" - ? { commanderFullname: formData.commanderFullname } - : null, - tp === "EV1_006" || tp === "EV1_008" - ? { commanderPosition: formData.commanderPosition } - : null, - tp === "EV1_006" ? { commanderOrg: "" } : null, - tp === "EV1_006" || tp === "EV1_008" - ? { commanderAboveFullname: formData.commanderAboveFullname } - : null, - tp === "EV1_006" || tp === "EV1_008" - ? { commanderAbovePosition: formData.commanderAbovePosition } - : null, - tp === "EV1_006" ? { commanderAboveOrg: "" } : null, + // tp === "EV1_006" + // ? { + // years: { + // lastTwoYear: toThaiNumber(currentYear - 2 + 543), + // lastOneYear: toThaiNumber(currentYear - 1 + 543), + // currentYear: toThaiNumber(currentYear + 543), + // }, + // } + // : null, + // tp === "EV1_006" || tp === "EV1_008" + // ? { commanderFullname: formData.commanderFullname } + // : null, + // tp === "EV1_006" || tp === "EV1_008" + // ? { commanderPosition: formData.commanderPosition } + // : null, + // tp === "EV1_006" ? { commanderOrg: "" } : null, + // tp === "EV1_006" || tp === "EV1_008" + // ? { commanderAboveFullname: formData.commanderAboveFullname } + // : null, + // tp === "EV1_006" || tp === "EV1_008" + // ? { commanderAbovePosition: formData.commanderAbovePosition } + // : null, + // tp === "EV1_006" ? { commanderAboveOrg: "" } : null, - tp === "EV1_007" ? { positionName: "-" } : null, - tp === "EV1_007" ? { positionLeaveName: "-" } : null, + // tp === "EV1_007" ? { positionName: "-" } : null, + // tp === "EV1_007" ? { positionLeaveName: "-" } : null, - tp === "EV1_009" ? { dateStart: dataPerson.formData.dateStart } : null, - tp === "EV1_009" - ? { dateRetireLaw: dataPerson.formData.dateRetireLaw } - : null, + // tp === "EV1_009" ? { dateStart: dataPerson.formData.dateStart } : null, + // tp === "EV1_009" + // ? { dateRetireLaw: dataPerson.formData.dateRetireLaw } + // : null, - tp === "EV1_010" ? { subject: formData.subject } : null, - { typeTh: "เชี่ยวชาญ" }, - { posNoWithSym: `(${dataPerson.formData.posNo})` }, - { orgNoNewLine: dataPerson.formData.org } - ); + // tp === "EV1_010" ? { subject: formData.subject } : null, + // { typeTh: "เชี่ยวชาญ" }, + // { posNoWithSym: `(${dataPerson.formData.posNo})` }, + // { orgNoNewLine: dataPerson.formData.org } + // ); const body = { template: tp, reportName: templateName, - data: data, + data: reportData.value, }; await genReport(body, fileName); //สร้างไฟล์ต้นแบบ } @@ -402,7 +402,7 @@ async function uploadfile(uploadUrl: string, file: any) { }); } -function getData() { +async function getData() { showLoader(); http .get(config.API.evaluationExpertise + `/${evaluateId.value}`) @@ -418,9 +418,10 @@ function getData() { }) .catch((e) => { messageError($q, e); + hideLoader(); }) .finally(() => { - hideLoader(); + }); } @@ -447,9 +448,24 @@ const keyObject = ref([ "assessments", "government", ]); +const reportData = ref() +async function getCheckSpace(){ + http + .get(config.API.evaluationReportCheckspecByid(evaluateId.value)) + .then((res)=>{ + reportData.value = res.data.result + }) + .catch((e)=>{ + messageError($q,e) + hideLoader(); + }).finally(()=>{ + + }) +} + onMounted(() => { showLoader(); - Promise.all([getData(), ...keyObject.value.map(getDetail)]) + Promise.all([getData(),getCheckSpace(), ...keyObject.value.map(getDetail)]) .then(() => {}) .catch((e) => { hideLoader(); From c1622582d2580bb193c5ae20edede7a56355197b Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Fri, 30 May 2025 14:29:16 +0700 Subject: [PATCH 3/4] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88?= =?UTF-8?q?=E0=B8=A1=E0=B8=95=E0=B8=B1=E0=B8=A7=E0=B9=80=E0=B9=80=E0=B8=9B?= =?UTF-8?q?=E0=B8=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ExpertPageDetail.vue | 37 ++++++++++--------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/src/modules/06_evaluate/components/ExpertPageDetail.vue b/src/modules/06_evaluate/components/ExpertPageDetail.vue index c722a0a..048da81 100644 --- a/src/modules/06_evaluate/components/ExpertPageDetail.vue +++ b/src/modules/06_evaluate/components/ExpertPageDetail.vue @@ -41,8 +41,14 @@ const formCommand = reactive({ commanderAboveFullname: "", //ผู้บังคับบัญชาเหนือขึ้นไป 1 ระดับ commanderAbovePosition: "", //ตำแหน่ง ผู้บังคับบัญชาเหนือขึ้นไป 1 ระดับ author: "", //เจ้าของผลงาน - subject: "", //ชื่อผลงาน + subject: [], //ชื่อผลงาน assignedPosition: "", + commanderPositionOld: "", + commanderOrgOld: "", + commanderOrg: "", + commanderAbovePositionOld: "", + commanderAboveOrgOld: "", + commanderAboveOrg: "", }); const formData = reactive({ @@ -420,9 +426,7 @@ async function getData() { messageError($q, e); hideLoader(); }) - .finally(() => { - - }); + .finally(() => {}); } function getDetail(type: any) { @@ -448,24 +452,23 @@ const keyObject = ref([ "assessments", "government", ]); -const reportData = ref() -async function getCheckSpace(){ +const reportData = ref(); +async function getCheckSpace() { http - .get(config.API.evaluationReportCheckspecByid(evaluateId.value)) - .then((res)=>{ - reportData.value = res.data.result - }) - .catch((e)=>{ - messageError($q,e) - hideLoader(); - }).finally(()=>{ - - }) + .get(config.API.evaluationReportCheckspecByid(evaluateId.value)) + .then((res) => { + reportData.value = res.data.result; + }) + .catch((e) => { + messageError($q, e); + hideLoader(); + }) + .finally(() => {}); } onMounted(() => { showLoader(); - Promise.all([getData(),getCheckSpace(), ...keyObject.value.map(getDetail)]) + Promise.all([getData(), getCheckSpace(), ...keyObject.value.map(getDetail)]) .then(() => {}) .catch((e) => { hideLoader(); From f9402606389dace937106d958a1837817d2bf80d Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Fri, 30 May 2025 16:36:32 +0700 Subject: [PATCH 4/4] fix status --- src/modules/03_retire/store.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/03_retire/store.ts b/src/modules/03_retire/store.ts index e322d20..c5b28f5 100644 --- a/src/modules/03_retire/store.ts +++ b/src/modules/03_retire/store.ts @@ -24,7 +24,7 @@ export const useRestDataStore = defineStore("Rest", () => { case "DONEREJECT": return "ออกคำสั่งยกเลิกลาออกเสร็จแล้ว"; case "CANCELING": - return "กำลังดำเนิดการยกเลิกการ"; + return "กำลังดำเนินการยกเลิก"; default: return "-"; }