From 2b67d24b4d8486862150a150268fba093bf67eec Mon Sep 17 00:00:00 2001 From: AnandaTon <125332905+anandaAiemvong@users.noreply.github.com> Date: Mon, 21 Aug 2023 15:05:05 +0700 Subject: [PATCH 1/2] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=20=E0=B9=84=E0=B8=9F=E0=B8=A5=E0=B9=8C=20=E0=B8=AB?= =?UTF-8?q?=E0=B8=99=E0=B9=89=E0=B8=B2=20tranfer/=E0=B9=80=E0=B8=9E?= =?UTF-8?q?=E0=B8=B4=E0=B9=88=E0=B8=A1=20=20=E0=B9=80=E0=B8=9E=E0=B8=B4?= =?UTF-8?q?=E0=B9=88=E0=B8=A1=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?= =?UTF-8?q?=E0=B9=83=E0=B8=99=E0=B8=AB=E0=B8=99=E0=B9=89=E0=B8=B2=20leave?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/02_transfer/views/AddTransfer.vue | 9 +- src/modules/03_leave/router.ts | 72 ++-- src/modules/03_leave/views/AddLeave.vue | 404 ++++++++---------- 3 files changed, 223 insertions(+), 262 deletions(-) diff --git a/src/modules/02_transfer/views/AddTransfer.vue b/src/modules/02_transfer/views/AddTransfer.vue index da7bf8c..ad50df6 100644 --- a/src/modules/02_transfer/views/AddTransfer.vue +++ b/src/modules/02_transfer/views/AddTransfer.vue @@ -22,7 +22,7 @@ accept=".jpg,.png,.pdf,.csv,.doc" url="http://localhost:4444/upload" label="เอกสารเพิ่มเติม" - multiple + type="file" @added="fileUploadDoc" style="max-width: px" /> @@ -336,6 +336,8 @@ const createTransfer = async () => { formData.append("Organization", tranferOrg.value) formData.append("Reason", noteReason.value) formData.append("file", files.value) + console.log(files.value) + console.log(formData) await http .post(config.API.listtransfer(), formData) @@ -369,7 +371,8 @@ const fecthDataTransfer = async (id: string) => { }) } -const fileUploadDoc = async (files: any) => { - fileDocDataUpload.value.push(files) +const fileUploadDoc = async (file: any) => { + fileDocDataUpload.value.push(file) + files.value = file } diff --git a/src/modules/03_leave/router.ts b/src/modules/03_leave/router.ts index 7540b1f..5fc2b1a 100644 --- a/src/modules/03_leave/router.ts +++ b/src/modules/03_leave/router.ts @@ -2,36 +2,48 @@ * Router ขอโอน */ -const LeaveMain = () => import("@/modules/03_leave/views/Main.vue"); +const LeaveMain = () => import("@/modules/03_leave/views/Main.vue") -const AddLeave = () => import("@/modules/03_leave/views/AddLeave.vue"); +const AddLeave = () => import("@/modules/03_leave/views/AddLeave.vue") + +const ResultQuestionair = () => import("@/modules/03_leave/views/result.vue") export default [ - { - path: "/leave", - name: "leave", - component: LeaveMain, - meta: { - Auth: true, - Key: [7], - }, - }, - { - path: "/leave/add", - name: "AddLeave", - component: AddLeave, - meta: { - Auth: true, - Key: [7], - }, - }, - { - path: "/leave/:id", - name: "detailLeave", - component: AddLeave, - meta: { - Auth: true, - Key: [7], - }, - }, -]; + { + path: "/leave", + name: "leave", + component: LeaveMain, + meta: { + Auth: true, + Key: [7], + }, + }, + { + path: "/leave/add", + name: "AddLeave", + component: AddLeave, + meta: { + Auth: true, + Key: [7], + }, + }, + { + path: "/leave/:id", + name: "detailLeave", + component: AddLeave, + meta: { + Auth: true, + Key: [7], + }, + }, + + { + path: "/leave/result", + name: "resultLeave", + component: ResultQuestionair, + meta: { + Auth: true, + Key: [7], + }, + }, +] diff --git a/src/modules/03_leave/views/AddLeave.vue b/src/modules/03_leave/views/AddLeave.vue index 8dcc1d5..c801d44 100644 --- a/src/modules/03_leave/views/AddLeave.vue +++ b/src/modules/03_leave/views/AddLeave.vue @@ -1,240 +1,186 @@ - - - - - เพิ่มเรื่องลาออก - รายละเอียดเรื่องลาออก - - - - - - - - ลาออก - - - - - - - {{ year + 543 }} - - - {{ parseInt(value + 543) }} - - - - - - - - - - - - - {{ year + 543 }} - - - {{ parseInt(value + 543) }} - - - - - - - - - - - + + + + + เพิ่มเรื่องลาออก + รายละเอียดเรื่องลาออก + + + + + + + ลาออก + + + + + + {{ year + 543 }} + + + {{ parseInt(value + 543) }} + + + + + + + + + + + + {{ year + 543 }} + + + {{ parseInt(value + 543) }} + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + From 8511baf41166ecb253adb15d938cbb650d6ba6e3 Mon Sep 17 00:00:00 2001 From: AnandaTon <125332905+anandaAiemvong@users.noreply.github.com> Date: Mon, 21 Aug 2023 15:05:48 +0700 Subject: [PATCH 2/2] =?UTF-8?q?=E0=B9=81=E0=B8=9A=E0=B8=9A=E0=B8=9F?= =?UTF-8?q?=E0=B8=AD=E0=B8=A3=E0=B9=8C=E0=B8=A1=E0=B8=A5=E0=B8=B2=E0=B8=AD?= =?UTF-8?q?=E0=B8=AD=E0=B8=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/03_leave/views/result.vue | 85 +++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 src/modules/03_leave/views/result.vue diff --git a/src/modules/03_leave/views/result.vue b/src/modules/03_leave/views/result.vue new file mode 100644 index 0000000..dcd7877 --- /dev/null +++ b/src/modules/03_leave/views/result.vue @@ -0,0 +1,85 @@ + + + + + + + + เราได้รับแบบฟอร์มของคุณแล้ว กรุณาตอบแบบสอบถาม + + + + + + + แบบสอบถาม + + + + + + + + + + + + + + + + + +