From b5fae92a033891fcbc036166adef1f16f68b3369 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Wed, 30 Aug 2023 11:19:56 +0700 Subject: [PATCH 1/4] =?UTF-8?q?=E0=B9=80=E0=B9=80=E0=B8=81=E0=B9=89?= =?UTF-8?q?=E0=B8=84=E0=B8=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/AppointMent/Main.vue | 2 +- .../components/Transfer/transferRegistry.vue | 48 +++++++++++++++++-- 2 files changed, 45 insertions(+), 5 deletions(-) diff --git a/src/modules/05_placement/components/AppointMent/Main.vue b/src/modules/05_placement/components/AppointMent/Main.vue index 9cd80f61a..13a950fdc 100644 --- a/src/modules/05_placement/components/AppointMent/Main.vue +++ b/src/modules/05_placement/components/AppointMent/Main.vue @@ -533,7 +533,7 @@ const pagination = ref({ /> เลือกหน่วยงานที่รับโอนเลือกหน่วยงาน/ตำแหน่ง - - ดาวน์โหลด + + ไฟล์ PDF - + ไฟล์ WORD @@ -463,7 +463,41 @@ const responseData = ref({ status: "", fullname: "", }); +const filePdf = (id:number,type:string) =>{ +} +const fileDoc = (id:number,type:string) =>{ + +} +// 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); +// }; + +// const FileDownload = async (type: string) => { +// showLoader(); +// await http +// .get(config.API.reportEvaluateRecord1(type, numTab.id), { +// responseType: "blob", +// }) +// .then(async (res) => { +// downloadFile( +// res, +// `แบบบันทึกผล(ผู้ดูเเล)_${fullname.value}_ครั้งที่.${type}` +// ); +// }) +// .catch((e) => { +// messageError($q, e); +// }) +// .finally(() => { +// hideLoader(); +// }); +// }; const rows = ref([]); const columns = ref([ { @@ -503,22 +537,28 @@ onMounted(async () => { await getData(); }); -const rowsFileDownload = ref([{ +const rowsFileDownload = ref([{ + id:1, fileName: "คําร้องขอโอนไปถึงส่วนราชการอื่นนอก กรุงเทพมหานครที่ข้าราชการประสงค์ขอโอน", pathName: "" },{ + id:2, fileName: "หนังสือแจ้งสํานักงานการเจ้าหน้าที่ สํานักปลัดกรุงเทพมหานคร ให้ทราบตําแหน่งและตําแหน่งเลขที่ที่ดําเนินการให้โอน", pathName: "" },{ + id:3, fileName: "หนังสือยินยอมให้โอนและวันที่พร้อมจะให้โอนไปยัง หน่วยงานที่รับโอน", pathName: "" },{ + id:4, fileName: "หนังสือแจ้งสหกรณ์ออมทรัพย์กรุงเทพมหานครเพื่อขอ ตรวจสอบภาระหนี้สินสหกรณ์ออมทรัพย์", pathName: "" },{ + id:5, fileName: "หนังสือถึงสํานักงานการเจ้าหน้าที่ สํานักปลัดกรุงเทพมหานครเพื่อขอตรวจสอบพฤติการณ์ทางวินัย และภาระหนี้สินสวัสดิการ", pathName: "" },{ + id:6, fileName: "หนังสือถึงสถาบันพัฒนาข้าราชการกรุงเทพมหานครเพื่อขอตรวจสอบเรื่องภาระผูกพันการรับทุนและการลา ศึกษาต่อกับทางกรุงเทพมหานคร", pathName: "" }]); From 38e7c6b56a1f50bba2f67b94a463e76a5ed30e98 Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Wed, 30 Aug 2023 12:51:12 +0700 Subject: [PATCH 2/4] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88?= =?UTF-8?q?=E0=B8=A1=20ui=20=E0=B8=AD=E0=B8=B1=E0=B8=9E=E0=B9=82=E0=B8=AB?= =?UTF-8?q?=E0=B8=A5=E0=B8=94=E0=B9=84=E0=B8=9F=E0=B8=A5=E0=B9=8C=20/=20de?= =?UTF-8?q?tail=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Receive/receiveDetail2.vue | 74 +++++++++++- .../components/Receive/receiveMain.vue | 109 +++++++++++++++++- 2 files changed, 180 insertions(+), 3 deletions(-) diff --git a/src/modules/05_placement/components/Receive/receiveDetail2.vue b/src/modules/05_placement/components/Receive/receiveDetail2.vue index f92611c76..8e7018134 100644 --- a/src/modules/05_placement/components/Receive/receiveDetail2.vue +++ b/src/modules/05_placement/components/Receive/receiveDetail2.vue @@ -49,7 +49,36 @@ const status = ref(""); const myForm = ref(null); const edit = ref(false); - +const rows = ref([]); +const columns = ref([ + { + name: "no", + align: "left", + label: "ลำดับ", + sortable: true, + field: "no", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "fileName", + align: "left", + label: "ชื่อไฟล์", + sortable: true, + field: "fileName", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "btnMicrosoft", + align: "right", + label: "ปุ่ม", + sortable: true, + field: "btnMicrosoft", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, +]); const profileId = ref(""); const educationOld = ref(""); const organizationPositionOld = ref(""); @@ -170,7 +199,17 @@ const getData = async () => { .get(config.API.receiveDataId(paramsId.toString())) .then(async (res: any) => { const data = res.data.result; - + // console.log(data); + let list: any[] = []; + if (data.docs.length > 0) { + data.docs.map((doc: any) => { + list.push({ + pathName: doc.pathName ?? "", + fileName: doc.fileName ?? "", + }); + }); + } + rows.value = list; profileId.value = data.profileId; title.value.fullname = `${data.firstname ?? "-"} ${data.lastname ?? "-"}`; title.value.organizationPositionOld = data.organizationPositionOld ?? "-"; @@ -1012,6 +1051,37 @@ const getClass = (val: boolean) => { + +
+
เอกสารเพิ่มเติม
+
+
+
+ + + +
+
diff --git a/src/modules/05_placement/components/Receive/receiveMain.vue b/src/modules/05_placement/components/Receive/receiveMain.vue index 56d03433d..a60171a4a 100644 --- a/src/modules/05_placement/components/Receive/receiveMain.vue +++ b/src/modules/05_placement/components/Receive/receiveMain.vue @@ -45,6 +45,8 @@ const popup = () => { modal.value = true; }; +const modalupload = ref(false); + const modalTree = ref(false); const personal = ref([]); const personalId = ref(""); @@ -70,7 +72,8 @@ const visibleColumns2 = ref([ const filterKeyword = ref(""); const filterKeyword2 = ref(""); const filterRef = ref(null); - + const files = ref(); + const fileDocDataUpload = ref([]); const listRecevice = ref([]); const filters = ref([]); const rows = ref([ @@ -309,6 +312,32 @@ const fecthlistRecevice = async () => { }); }; +const fileUploadDoc = async (files: any) => { + files.forEach((file: any) => { + fileDocDataUpload.value.push(file); + }); +}; + +const addUpload= async () => { + // showLoader(); + // await http + // .post(config.API.listRoundInsignia()) + // .then(() => { + // success($q, "บันทึกข้อมูลสำเร็จ"); + // }) + // .catch((e) => { + // messageError($q, e); + // }) + // .finally(async () => { + // hideLoader(); + // }); +}; + +const SaveData = async () => { + await addUpload(); + await clickCloseUpload(); +}; + const resetFilter = () => { filterKeyword.value = ""; filterKeyword2.value = ""; @@ -328,6 +357,9 @@ const add = () => { const clickClose = () => { modal.value = false; }; +const clickCloseUpload = () => { + modalupload.value = false; +}; const openModalTree = (id: string) => { personalId.value = id; @@ -337,6 +369,11 @@ const openModalTree = (id: string) => { modalTree.value = true; }; +const openUpload = (id: string) => { + personalId.value = id; + modalupload.value = true; +}; + const openDelete = (id: string) => { dialogRemove($q, async () => await fetchDataDelete(id)); }; @@ -594,6 +631,35 @@ const saveOrder = async () => { >เลือกหน่วยงานที่รับโอน
+ + + + + อัพโหลดเอกสาร + { + + + + + + +
+
+ + + + +
+
+
+ + + + บันทึก + + +
+
+ Date: Wed, 30 Aug 2023 14:39:35 +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=20api=20=E0=B9=80=E0=B9=80=E0=B8=81=E0=B9=89=E0=B8=84?= =?UTF-8?q?=E0=B8=B3=20=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1=20?= =?UTF-8?q?=E0=B8=9F=E0=B8=B4=E0=B8=A5=E0=B9=80=E0=B8=95=E0=B8=AD=E0=B8=A3?= =?UTF-8?q?=E0=B9=8C=20status?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/05_placement/api.placement.ts | 1 + src/api/reports/api.report.ts | 8 +- .../components/AppointMent/Main.vue | 4 +- .../components/Transfer/transferRegistry.vue | 84 +++++++++---------- .../components/resign/Resign.vue | 2 +- 5 files changed, 49 insertions(+), 50 deletions(-) diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index c8e627c3f..ac0f6788a 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -157,4 +157,5 @@ export default { orderCPMUpdate: (type: string, id: string) => `${order}/order/${type}/detail/${id}`, + }; diff --git a/src/api/reports/api.report.ts b/src/api/reports/api.report.ts index 7ebb240cd..fbfdffce7 100644 --- a/src/api/reports/api.report.ts +++ b/src/api/reports/api.report.ts @@ -6,6 +6,7 @@ const reportOrder = `${env.API_REPORT2_URI}/report/order`; const reportRetire = `${env.API_REPORT2_URI}/report/retire`; const reportProbation = `${env.API_REPORT2_URI}/report/probation`; const reportResign = `${env.API_REPORT2_URI}/report/resign/33`; +const reportTransfer = `${env.API_REPORT2_URI}/report/transfer`; export default { reportOrderCover: (fileType: string, id: string, commandCode: string) => @@ -30,5 +31,8 @@ export default { reportEvaluate:(type:string, id:string) => `${reportProbation}/16/${type}/${id}`, reportEvaluateChairman:(type:string, id:string) => `${reportProbation}/17/${type}/${id}`, reportEvaluateResult:(type:string, id:string) => `${reportProbation}/18/${type}/${id}`, - reportSurvey:(type:string, id:string) => `${reportProbation}/19/${type}/${id}` -}; + reportSurvey:(type:string, id:string) => `${reportProbation}/19/${type}/${id}`, + + //filetransfer + reportTransferFile:(no:number,type:string,id:string) => `${reportTransfer}/${no}/${type}/${id}` + }; diff --git a/src/modules/05_placement/components/AppointMent/Main.vue b/src/modules/05_placement/components/AppointMent/Main.vue index 13a950fdc..2c136721f 100644 --- a/src/modules/05_placement/components/AppointMent/Main.vue +++ b/src/modules/05_placement/components/AppointMent/Main.vue @@ -89,7 +89,7 @@ const fecthlistappointment = async () => { console.log(res); let response = res.data.result; listRecevice.value = response; - // console.log(response); + console.log(response); rows.value = response.map((e: any) => ({ personalId: e.id, citizenId: e.citizenId, @@ -112,7 +112,7 @@ const fecthlistappointment = async () => { birthday: e.dateOfBirth == null ? "-" : date2Thai(e.dateOfBirth), })); // console.log(rows.value); - rows2.value = rows.value.filter((e: any) => e.orgName !== null); + rows2.value = rows.value.filter((e: any) => e.orgName !== null && e.status !== 'ส่งรายชื่อไปออกคำสั่ง'&& e.status !== 'ออกคำสั่งเสร็จแล้ว'); }) .catch((e) => { console.log(typeof e); diff --git a/src/modules/05_placement/components/Transfer/transferRegistry.vue b/src/modules/05_placement/components/Transfer/transferRegistry.vue index eb459979c..36edb0b3d 100644 --- a/src/modules/05_placement/components/Transfer/transferRegistry.vue +++ b/src/modules/05_placement/components/Transfer/transferRegistry.vue @@ -167,10 +167,10 @@ {{ props.row.fileName }} - + ไฟล์ PDF - + ไฟล์ WORD @@ -423,8 +423,9 @@ const $q = useQuasar(); const route = useRoute(); const router = useRouter(); const mixin = useCounterMixin(); +const id = ref("") +const dataId = (route.params.id as string); -const dataId = route.params.id; const { date2Thai, messageError, @@ -463,41 +464,34 @@ const responseData = ref({ status: "", fullname: "", }); -const filePdf = (id:number,type:string) =>{ - -} -const fileDoc = (id:number,type:string) =>{ - -} -// 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); -// }; - -// const FileDownload = async (type: string) => { -// showLoader(); -// await http -// .get(config.API.reportEvaluateRecord1(type, numTab.id), { -// responseType: "blob", -// }) -// .then(async (res) => { -// downloadFile( -// res, -// `แบบบันทึกผล(ผู้ดูเเล)_${fullname.value}_ครั้งที่.${type}` -// ); -// }) -// .catch((e) => { -// messageError($q, e); -// }) -// .finally(() => { -// hideLoader(); -// }); -// }; +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); +}; +const fileDownload = async (no:number,type:string) =>{ + showLoader(); + await http + .get(config.API.reportTransferFile(no,type,id.value), { + responseType: "blob", + }) + .then(async (res) => { + downloadFile( + res, + `_ครั้งที่.${type}` + ); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); +}; const rows = ref([]); const columns = ref([ { @@ -538,27 +532,27 @@ onMounted(async () => { }); const rowsFileDownload = ref([{ - id:1, + no:1, fileName: "คําร้องขอโอนไปถึงส่วนราชการอื่นนอก กรุงเทพมหานครที่ข้าราชการประสงค์ขอโอน", pathName: "" },{ - id:2, + no:2, fileName: "หนังสือแจ้งสํานักงานการเจ้าหน้าที่ สํานักปลัดกรุงเทพมหานคร ให้ทราบตําแหน่งและตําแหน่งเลขที่ที่ดําเนินการให้โอน", pathName: "" },{ - id:3, + no:3, fileName: "หนังสือยินยอมให้โอนและวันที่พร้อมจะให้โอนไปยัง หน่วยงานที่รับโอน", pathName: "" },{ - id:4, + no:4, fileName: "หนังสือแจ้งสหกรณ์ออมทรัพย์กรุงเทพมหานครเพื่อขอ ตรวจสอบภาระหนี้สินสหกรณ์ออมทรัพย์", pathName: "" },{ - id:5, + no:5, fileName: "หนังสือถึงสํานักงานการเจ้าหน้าที่ สํานักปลัดกรุงเทพมหานครเพื่อขอตรวจสอบพฤติการณ์ทางวินัย และภาระหนี้สินสวัสดิการ", pathName: "" },{ - id:6, + no:6, fileName: "หนังสือถึงสถาบันพัฒนาข้าราชการกรุงเทพมหานครเพื่อขอตรวจสอบเรื่องภาระผูกพันการรับทุนและการลา ศึกษาต่อกับทางกรุงเทพมหานคร", pathName: "" }]); @@ -569,7 +563,7 @@ const getData = async () => { .get(config.API.transferId(dataId.toString())) .then((res: any) => { const data = res.data.result; - // console.log(data); + id.value = data.id let list: TypeFile[] = []; if (data.docs.length > 0) { data.docs.map((doc: TypeFile) => { diff --git a/src/modules/06_retirement/components/resign/Resign.vue b/src/modules/06_retirement/components/resign/Resign.vue index 4c9e2d9c0..97152019b 100644 --- a/src/modules/06_retirement/components/resign/Resign.vue +++ b/src/modules/06_retirement/components/resign/Resign.vue @@ -488,7 +488,7 @@ const saveOrder = async () => { - +
From 4c0df4ed71878a8ffadd92116a99a99b333f547c Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Wed, 30 Aug 2023 16:08:44 +0700 Subject: [PATCH 4/4] =?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=B9=81=E0=B8=95=E0=B9=88=E0=B8=87=E0=B8=95?= =?UTF-8?q?=E0=B8=B1=E0=B9=89=E0=B8=87-=E0=B9=80=E0=B8=A5=E0=B8=B7?= =?UTF-8?q?=E0=B9=88=E0=B8=AD=E0=B8=99-=E0=B8=A2=E0=B9=89=E0=B8=B2?= =?UTF-8?q?=E0=B8=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/interface/request/main/main.ts | 12 +- .../components/AppointMent/Main.vue | 119 ++++++++++++------ .../05_placement/components/Other/Main.vue | 2 +- 3 files changed, 85 insertions(+), 48 deletions(-) diff --git a/src/interface/request/main/main.ts b/src/interface/request/main/main.ts index 2bee16193..441bd5dad 100644 --- a/src/interface/request/main/main.ts +++ b/src/interface/request/main/main.ts @@ -250,12 +250,12 @@ const menuList = readonly([ path: "appoint-promote", role: "placement", }, - { - key: 6.9, - label: "รายการย้าย" /* */, - path: "relocation", - role: "placement", - }, + // { + // key: 6.9, + // label: "รายการย้าย" /* */, + // path: "relocation", + // role: "placement", + // }, { key: 6.1, label: "รายการอื่นๆ" /* */, diff --git a/src/modules/05_placement/components/AppointMent/Main.vue b/src/modules/05_placement/components/AppointMent/Main.vue index 2c136721f..24638d437 100644 --- a/src/modules/05_placement/components/AppointMent/Main.vue +++ b/src/modules/05_placement/components/AppointMent/Main.vue @@ -93,7 +93,7 @@ const fecthlistappointment = async () => { rows.value = response.map((e: any) => ({ personalId: e.id, citizenId: e.citizenId, - fullname: e.prefix+e.firstname + " " + e.lastname, + fullname: e.prefix + e.firstname + " " + e.lastname, organizationName: e.organizationName + " " + @@ -107,12 +107,17 @@ const fecthlistappointment = async () => { positionNumber: e.positionNumber, positionPath: e.positionPath, status: status(e.status), - createdAt:date2Thai(e.createdAt), - + createdAt: date2Thai(e.createdAt), + birthday: e.dateOfBirth == null ? "-" : date2Thai(e.dateOfBirth), })); // console.log(rows.value); - rows2.value = rows.value.filter((e: any) => e.orgName !== null && e.status !== 'ส่งรายชื่อไปออกคำสั่ง'&& e.status !== 'ออกคำสั่งเสร็จแล้ว'); + rows2.value = rows.value.filter( + (e: any) => + e.orgName !== null && + e.status !== "ส่งรายชื่อไปออกคำสั่ง" && + e.status !== "ออกคำสั่งเสร็จแล้ว" + ); }) .catch((e) => { console.log(typeof e); @@ -127,7 +132,10 @@ const fecthTypeOption = async () => { .get(config.API.typeOrder()) .then((res) => { optionsType.value = res.data.result.filter( - (e: any) => e.commandCode === "C-PM-05" || e.commandCode === "C-PM-06" + (e: any) => + e.commandCode === "C-PM-05" || + e.commandCode === "C-PM-06" || + e.commandCode === "C-PM-07" ); }) .catch((e) => { @@ -173,7 +181,6 @@ const columns = ref([ field: "organizationName", headerStyle: "font-size: 14px", style: "font-size: 14px", - }, { name: "birthday", @@ -252,7 +259,6 @@ const columns2 = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", }, - ]); const openModalTree = (id: string) => { @@ -279,35 +285,64 @@ const deleteAppoint = async (id: string) => { hideLoader(); }); }; + const clickAddlist = () => { dialogConfirm($q, () => createdAppoint()); }; const createdAppoint = async () => { - let pId: string[] = []; - selected.value.forEach((e: any) => { - pId.push(e.personalId); - }); - let data = { - id: pId, - }; - console.log(data); - showLoader(); - await http - .put(config.API.apppointmentReport(type.value), data) - .then((res: any) => { - console.log(res); - success($q, "บันทึกสำเร็จ"); - }) - .catch((e: any) => { - console.log(e); - messageError($q, e); - }) - .finally(() => { - hideLoader(); - fecthlistappointment(); - selected.value = []; - modal.value = false; + if (type.value == "c6de09ef-c1f8-4a39-aa31-c7ed88df01d9") { + let pId: string[] = []; + selected.value.forEach((e: any) => { + pId.push(e.personalId); }); + let data = { + id: pId, + }; + console.log(data); + showLoader(); + await http + .post(config.API.relocationMainReport(), data) + .then((res: any) => { + console.log(res); + success($q, "บันทึกสำเร็จ"); + }) + .catch((e) => { + console.log(e); + messageError($q, e); + }) + .finally(async () => { + hideLoader(); + fecthlistappointment(); + selected.value = []; + modal.value = false; + }); + } else { + let pId: string[] = []; + selected.value.forEach((e: any) => { + pId.push(e.personalId); + }); + let data = { + id: pId, + }; + console.log(data); + showLoader(); + await http + .put(config.API.apppointmentReport(type.value), data) + .then((res: any) => { + console.log(res); + success($q, "บันทึกสำเร็จ"); + }) + .catch((e: any) => { + console.log(e); + messageError($q, e); + }) + .finally(() => { + hideLoader(); + fecthlistappointment(); + selected.value = []; + modal.value = false; + }); + } }; const closeModalTree = async () => { @@ -340,11 +375,10 @@ const pagination = ref({ page: 1, rowsPerPage: 10, }); -