From 809216c6d8c7dcc7593576b143feacd3c41946a0 Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Tue, 7 Nov 2023 19:46:08 +0700 Subject: [PATCH 1/8] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88?= =?UTF-8?q?=E0=B8=A1=20modal=20sickform?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../05_leave/componenst/Forms/01_SickForm.vue | 390 +++++++++--------- 1 file changed, 190 insertions(+), 200 deletions(-) diff --git a/src/modules/05_leave/componenst/Forms/01_SickForm.vue b/src/modules/05_leave/componenst/Forms/01_SickForm.vue index 382a2d6..ed5ecad 100644 --- a/src/modules/05_leave/componenst/Forms/01_SickForm.vue +++ b/src/modules/05_leave/componenst/Forms/01_SickForm.vue @@ -1,20 +1,54 @@ From d177859908452b57aa89adcaf7ed861372d1fc41 Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Wed, 8 Nov 2023 12:58:20 +0700 Subject: [PATCH 2/8] =?UTF-8?q?=E0=B8=AD=E0=B8=B1=E0=B8=9E=E0=B9=80?= =?UTF-8?q?=E0=B8=94=E0=B8=97=20form?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../05_leave/componenst/Forms/01_SickForm.vue | 370 ++++++++++-------- .../componenst/Forms/04_HelpWifeBirthForm.vue | 326 ++++++++++++++- .../componenst/Forms/05_VacationForm.vue | 316 +++++++++++++-- .../interface/request/HelpWifeForm.ts | 31 ++ .../05_leave/interface/request/SickForm.ts | 17 +- .../interface/request/VacationForm.ts | 31 ++ src/modules/05_leave/views/SampleForm.vue | 109 +++--- 7 files changed, 947 insertions(+), 253 deletions(-) create mode 100644 src/modules/05_leave/interface/request/HelpWifeForm.ts create mode 100644 src/modules/05_leave/interface/request/VacationForm.ts diff --git a/src/modules/05_leave/componenst/Forms/01_SickForm.vue b/src/modules/05_leave/componenst/Forms/01_SickForm.vue index ed5ecad..fdbc713 100644 --- a/src/modules/05_leave/componenst/Forms/01_SickForm.vue +++ b/src/modules/05_leave/componenst/Forms/01_SickForm.vue @@ -1,6 +1,6 @@ diff --git a/src/modules/05_leave/componenst/Forms/04_HelpWifeBirthForm.vue b/src/modules/05_leave/componenst/Forms/04_HelpWifeBirthForm.vue index 963cc5e..8a87e37 100644 --- a/src/modules/05_leave/componenst/Forms/04_HelpWifeBirthForm.vue +++ b/src/modules/05_leave/componenst/Forms/04_HelpWifeBirthForm.vue @@ -1,18 +1,104 @@ diff --git a/src/modules/05_leave/componenst/Forms/05_VacationForm.vue b/src/modules/05_leave/componenst/Forms/05_VacationForm.vue index cb40641..88b3860 100644 --- a/src/modules/05_leave/componenst/Forms/05_VacationForm.vue +++ b/src/modules/05_leave/componenst/Forms/05_VacationForm.vue @@ -1,29 +1,301 @@ diff --git a/src/modules/05_leave/interface/request/HelpWifeForm.ts b/src/modules/05_leave/interface/request/HelpWifeForm.ts new file mode 100644 index 0000000..c0f9282 --- /dev/null +++ b/src/modules/05_leave/interface/request/HelpWifeForm.ts @@ -0,0 +1,31 @@ +interface FormData { + leaveNo: string //เขียนที่*** + wifeName: string //ชื่อภรรยา + brithDate: Date | null //วันที่คลอด + startLeaveDate: Date | null //*วัน เดือน ปีเริ่มต้นลา + endLeaveDate: Date | null //*วัน เดือน ปีสิ้นสุดลา + leaveTotal: string //จำนวนวันลา + contractTel: string //หมายเลขโทรศัพท์ที่ติดต่อได้ + leaveContactTel: string //หมายเลขที่ติดต่อขณะลา + leaveDetail: string //รายละเอียดการลา + leaveContactLocation: string //สถานที่ติดต่อขณะลา + file: File[] | null //เอกสารปะกอบ + [key: string]: any +} + +interface FormRef { + leaveNo: object | null //เขียนที่*** + startLeaveDate: object | null //*วัน เดือน ปีเริ่มต้นลา + wifeName: object | null //ชื่อภรรยา + brithDate: object | null //วันที่คลอด + endLeaveDate: object | null //*วัน เดือน ปีสิ้นสุดลา + leaveTotal: object | null //จำนวนวันลา + contractTel: object | null //หมายเลขโทรศัพท์ที่ติดต่อได้ + leaveContactTel: object | null //หมายเลขที่ติดต่อขณะลา + leaveDetail: object | null //รายละเอียดการลา + leaveContactLocation: object | null //สถานที่ติดต่อขณะลา + file: object | null //เอกสารปะกอบ + [key: string]: any +} + +export type { FormData, FormRef } diff --git a/src/modules/05_leave/interface/request/SickForm.ts b/src/modules/05_leave/interface/request/SickForm.ts index 02783eb..56b9b51 100644 --- a/src/modules/05_leave/interface/request/SickForm.ts +++ b/src/modules/05_leave/interface/request/SickForm.ts @@ -7,8 +7,21 @@ interface FormData { leaveContactTel: string //หมายเลขที่ติดต่อขณะลา leaveDetail: string //รายละเอียดการลา leaveContactLocation: string //สถานที่ติดต่อขณะลา - file: File | null //เอกสารปะกอบ + file: File[] | null //เอกสารปะกอบ [key: string]: any } -export type { FormData } +interface FormRef { + leaveNo: object | null //เขียนที่*** + startLeaveDate: object | null //*วัน เดือน ปีเริ่มต้นลา + endLeaveDate: object | null //*วัน เดือน ปีสิ้นสุดลา + leaveTotal: object | null //จำนวนวันลา + contractTel: object | null //หมายเลขโทรศัพท์ที่ติดต่อได้ + leaveContactTel: object | null //หมายเลขที่ติดต่อขณะลา + leaveDetail: object | null //รายละเอียดการลา + leaveContactLocation: object | null //สถานที่ติดต่อขณะลา + file: object | null //เอกสารปะกอบ + [key: string]: any +} + +export type { FormData, FormRef } diff --git a/src/modules/05_leave/interface/request/VacationForm.ts b/src/modules/05_leave/interface/request/VacationForm.ts new file mode 100644 index 0000000..119d4ca --- /dev/null +++ b/src/modules/05_leave/interface/request/VacationForm.ts @@ -0,0 +1,31 @@ +interface FormData { + leaveNo: string //เขียนที่*** + lastYearVacation: string //จำนวนวันลาพักผ่อนสะสม จากปีที่ผ่านมา + currentVacation: string //จำนวนวันลาพักผ่อนประจำปีปัจจุบัน + startLeaveDate: Date | null //*วัน เดือน ปีเริ่มต้นลา + endLeaveDate: Date | null //*วัน เดือน ปีสิ้นสุดลา + leaveTotal: string //จำนวนวันลา + contractTel: string //หมายเลขโทรศัพท์ที่ติดต่อได้ + leaveContactTel: string //หมายเลขที่ติดต่อขณะลา + leaveDetail: string //รายละเอียดการลา + leaveContactLocation: string //สถานที่ติดต่อขณะลา + file: File[] | null //เอกสารปะกอบ + [key: string]: any +} + +interface FormRef { + leaveNo: object | null //เขียนที่*** + startLeaveDate: object | null //*วัน เดือน ปีเริ่มต้นลา + lastYearVacation: object | null //ชื่อภรรยา + currentVacation: object | null //วันที่คลอด + endLeaveDate: object | null //*วัน เดือน ปีสิ้นสุดลา + leaveTotal: object | null //จำนวนวันลา + contractTel: object | null //หมายเลขโทรศัพท์ที่ติดต่อได้ + leaveContactTel: object | null //หมายเลขที่ติดต่อขณะลา + leaveDetail: object | null //รายละเอียดการลา + leaveContactLocation: object | null //สถานที่ติดต่อขณะลา + file: object | null //เอกสารปะกอบ + [key: string]: any +} + +export type { FormData, FormRef } diff --git a/src/modules/05_leave/views/SampleForm.vue b/src/modules/05_leave/views/SampleForm.vue index 5950011..c1bf7d2 100644 --- a/src/modules/05_leave/views/SampleForm.vue +++ b/src/modules/05_leave/views/SampleForm.vue @@ -1,81 +1,60 @@ From 89810f47badcfd93554539ca6cc2eb5ea58747d5 Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Wed, 8 Nov 2023 15:14:36 +0700 Subject: [PATCH 3/8] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88?= =?UTF-8?q?=E0=B8=A1=20followSpouseForm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../05_leave/componenst/Forms/01_SickForm.vue | 2 +- .../componenst/Forms/12_FollowSpouseForm.vue | 350 ++++++++++++++++-- .../interface/request/FollowSpouseForm.ts | 33 ++ src/modules/05_leave/views/SampleForm.vue | 4 +- 4 files changed, 362 insertions(+), 27 deletions(-) create mode 100644 src/modules/05_leave/interface/request/FollowSpouseForm.ts diff --git a/src/modules/05_leave/componenst/Forms/01_SickForm.vue b/src/modules/05_leave/componenst/Forms/01_SickForm.vue index fdbc713..e6f7c68 100644 --- a/src/modules/05_leave/componenst/Forms/01_SickForm.vue +++ b/src/modules/05_leave/componenst/Forms/01_SickForm.vue @@ -1,6 +1,6 @@ diff --git a/src/modules/05_leave/interface/request/FollowSpouseForm.ts b/src/modules/05_leave/interface/request/FollowSpouseForm.ts new file mode 100644 index 0000000..e66761a --- /dev/null +++ b/src/modules/05_leave/interface/request/FollowSpouseForm.ts @@ -0,0 +1,33 @@ +interface FormData { + leaveNo: string //เขียนที่*** + startLeaveDate: Date | null //*วัน เดือน ปีเริ่มต้นลา + endLeaveDate: Date | null //*วัน เดือน ปีสิ้นสุดลา + leaveTotal: string //จำนวนวันลา + salary: string //เงินเดือนปัจจุบัน + spouseName: string //ชื่อคู่สมรส + spousePosition: string //ตำแหน่งคู่สมรส + spouseLevel: string //ระดับคู่สมรส + dutyCountry: string //ไปปฏิบัติราชการ ณ ประเทศ + followHistory: string //ประวัติการลาติดตามคู่สมรส + leaveDetail: string //รายละเอียดการลา + file: File[] | null //เอกสารปะกอบ +} + +interface FormRef { + leaveNo: object | null //เขียนที่*** + startLeaveDate: object | null //*วัน เดือน ปีเริ่มต้นลา + endLeaveDate: object | null //*วัน เดือน ปีสิ้นสุดลา + leaveTotal: object | null //จำนวนวันลา + salary: object | null //เงินเดือนปัจจุบัน + spouseName: object | null //หมายเลขที่ติดต่อขณะลา + spousePosition: object | null //ตำแหน่งคู่สมรส + spouseLevel: object | null //ระดับคู่สมรส + dutyCountry: object | null //ไปปฏิบัติราชการ ณ ประเทศ + followHistory: object | null //ประวัติการลาติดตามคู่สมรส + leaveDetail: object | null //รายละเอียดการลา + leaveContactLocation: object | null //สถานที่ติดต่อขณะลา + file: object | null //เอกสารปะกอบ + [key: string]: any +} + +export type { FormData, FormRef } diff --git a/src/modules/05_leave/views/SampleForm.vue b/src/modules/05_leave/views/SampleForm.vue index c1bf7d2..02f56ba 100644 --- a/src/modules/05_leave/views/SampleForm.vue +++ b/src/modules/05_leave/views/SampleForm.vue @@ -4,7 +4,7 @@ import { reactive, ref, watch } from "vue" import SickForm from "@/modules/05_leave/componenst/Forms/01_SickForm.vue" import HelpWifeBirthForm from "@/modules/05_leave/componenst/Forms/04_HelpWifeBirthForm.vue" import VacationForm from "@/modules/05_leave/componenst/Forms/05_VacationForm.vue" - +import FollowSpouseForm from "@/modules/05_leave/componenst/Forms/12_FollowSpouseForm.vue" const type = ref(0) const typeOption = reactive([ { id: 0, name: "" }, @@ -13,6 +13,7 @@ const typeOption = reactive([ { id: 3, name: "ลาคลอด" }, { id: 4, name: "ลาไปช่วยเหลือภริยาที่คลอดบุตร" }, { id: 5, name: "ลาพักผ่อน" }, + { id: 6, name: "ลาติดตามคู่สมรส" }, ]) async function onSubmit() { @@ -45,6 +46,7 @@ watch( + From 906c0ba3ce92aea88ad59831e6561d5378fd1ab4 Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Wed, 8 Nov 2023 17:36:46 +0700 Subject: [PATCH 4/8] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88?= =?UTF-8?q?=E0=B8=A1=20=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7=E0=B8=B1?= =?UTF-8?q?=E0=B8=95=E0=B8=B4=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=A5=E0=B8=B2?= =?UTF-8?q?=E0=B8=95=E0=B8=B4=E0=B8=94=E0=B8=95=E0=B8=B2=E0=B8=A1=E0=B8=84?= =?UTF-8?q?=E0=B8=B9=E0=B9=88=E0=B8=AA=E0=B8=A1=E0=B8=A3=E0=B8=AA=E0=B8=A2?= =?UTF-8?q?=E0=B9=88=E0=B8=AD=E0=B8=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../componenst/Forms/12_FollowSpouseForm.vue | 102 +++++++++++++++--- .../interface/request/FollowSpouseForm.ts | 10 +- 2 files changed, 97 insertions(+), 15 deletions(-) diff --git a/src/modules/05_leave/componenst/Forms/12_FollowSpouseForm.vue b/src/modules/05_leave/componenst/Forms/12_FollowSpouseForm.vue index ab92d65..aca653f 100644 --- a/src/modules/05_leave/componenst/Forms/12_FollowSpouseForm.vue +++ b/src/modules/05_leave/componenst/Forms/12_FollowSpouseForm.vue @@ -27,7 +27,10 @@ const formData = reactive({ spousePosition: "", //ตำแหน่งคู่สมรส spouseLevel: "", //ระดับคู่สมรส dutyCountry: "", //ไปปฏิบัติราชการ ณ ประเทศ - followHistory: "", //ประวัติการลาติดตามคู่สมรส + followHistoryCountry: "", //ประวัติการลาติดตามคู่สมรส + followHistoryTime: "", + followHistoryStart: null, + followHistoryEnd: null, leaveDetail: "", //รายละเอียดการลา file: [], //เอกสารปะกอบ }) @@ -43,7 +46,10 @@ const leaveDetailRef = ref(null) const spousePositionRef = ref(null) const spouseLevelRef = ref(null) const dutyCountryRef = ref(null) -const followHistoryRef = ref(null) +const followHistoryCountryRef = ref(null) +const followHistoryTimeRef = ref(null) +const followHistoryStartRef = ref(null) +const followHistoryEndRef = ref(null) const fileRef = ref(null) const FormRef: FormRef = { @@ -56,7 +62,10 @@ const FormRef: FormRef = { spousePosition: spousePositionRef, //ตำแหน่งคู่สมรส spouseLevel: spouseLevelRef, //ระดับคู่สมรส dutyCountry: dutyCountryRef, //ไปปฏิบัติราชการ ณ ประเทศ - followHistory: followHistoryRef, //ประวัติการลาติดตามคู่สมรส + followHistoryCountry: followHistoryCountryRef, //ประวัติการลาติดตามคู่สมรส + followHistoryEnd: followHistoryEndRef, //ประวัติการลาติดตามคู่สมรส + followHistoryTime: followHistoryTimeRef, //ประวัติการลาติดตามคู่สมรส + followHistoryStart: followHistoryStartRef, //ประวัติการลาติดตามคู่สมรส leaveDetail: leaveDetailRef, //รายละเอียดการลา leaveContactLocation: leaveContactLocationRef, //สถานที่ติดต่อขณะลา file: fileRef, @@ -277,17 +286,84 @@ function onValidate() { :rules="[val => !!val || `${'ปฏิบัติราชการ ณ ประเทศ'}`]" /> +
+
ประวัติการลาติดตามคู่สมรสครั้งสุดท้าย
- + + + + + + + + + + + + +
Date: Wed, 8 Nov 2023 20:46:18 +0700 Subject: [PATCH 5/8] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88?= =?UTF-8?q?=E0=B8=A1=20=E0=B8=81=E0=B8=A3=E0=B8=AD=E0=B8=81=E0=B8=82?= =?UTF-8?q?=E0=B9=89=E0=B8=AD=E0=B8=A1=E0=B8=B9=E0=B8=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/05_leave/componenst/Forms/01_SickForm.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/05_leave/componenst/Forms/01_SickForm.vue b/src/modules/05_leave/componenst/Forms/01_SickForm.vue index e6f7c68..ee082ab 100644 --- a/src/modules/05_leave/componenst/Forms/01_SickForm.vue +++ b/src/modules/05_leave/componenst/Forms/01_SickForm.vue @@ -91,6 +91,8 @@ function onValidate() { diff --git a/src/modules/05_leave/componenst/Forms/04_HelpWifeBirthForm.vue b/src/modules/05_leave/componenst/Forms/04_HelpWifeBirthForm.vue index 3fec118..6f1bf8b 100644 --- a/src/modules/05_leave/componenst/Forms/04_HelpWifeBirthForm.vue +++ b/src/modules/05_leave/componenst/Forms/04_HelpWifeBirthForm.vue @@ -335,4 +335,9 @@ function onValidate() { + +
+ + +
diff --git a/src/modules/05_leave/componenst/Forms/05_VacationForm.vue b/src/modules/05_leave/componenst/Forms/05_VacationForm.vue index e220a2a..5cd5f2c 100644 --- a/src/modules/05_leave/componenst/Forms/05_VacationForm.vue +++ b/src/modules/05_leave/componenst/Forms/05_VacationForm.vue @@ -97,10 +97,7 @@ function onValidate() { diff --git a/src/modules/05_leave/componenst/Forms/11_WorkInternationalForm.vue b/src/modules/05_leave/componenst/Forms/11_WorkInternationalForm.vue index 5f21384..d7ebd63 100644 --- a/src/modules/05_leave/componenst/Forms/11_WorkInternationalForm.vue +++ b/src/modules/05_leave/componenst/Forms/11_WorkInternationalForm.vue @@ -1,19 +1,80 @@ diff --git a/src/modules/05_leave/componenst/Forms/12_FollowSpouseForm.vue b/src/modules/05_leave/componenst/Forms/12_FollowSpouseForm.vue index 185f6f6..f242f3f 100644 --- a/src/modules/05_leave/componenst/Forms/12_FollowSpouseForm.vue +++ b/src/modules/05_leave/componenst/Forms/12_FollowSpouseForm.vue @@ -172,8 +172,8 @@ function onValidate() { + +
+ + +
diff --git a/src/modules/05_leave/interface/request/WorkInternationalForm.ts b/src/modules/05_leave/interface/request/WorkInternationalForm.ts new file mode 100644 index 0000000..3b7952a --- /dev/null +++ b/src/modules/05_leave/interface/request/WorkInternationalForm.ts @@ -0,0 +1,18 @@ +interface FormData { + leaveNo: string //เขียนที่*** + startLeaveDate: Date | null //*วัน เดือน ปีเริ่มต้นลา + endLeaveDate: Date | null //*วัน เดือน ปีสิ้นสุดลา + leaveDetail: string //รายละเอียดการลา + file: File[] | null //เอกสารปะกอบ +} + +interface FormRef { + leaveNo: object | null //เขียนที่*** + startLeaveDate: object | null //*วัน เดือน ปีเริ่มต้นลา + endLeaveDate: object | null //*วัน เดือน ปีสิ้นสุดลา + leaveDetail: object | null //รายละเอียดการลา + file: object | null //เอกสารปะกอบ + [key: string]: any +} + +export type { FormData, FormRef } diff --git a/src/modules/05_leave/views/SampleForm.vue b/src/modules/05_leave/views/SampleForm.vue index 02f56ba..92b1bcc 100644 --- a/src/modules/05_leave/views/SampleForm.vue +++ b/src/modules/05_leave/views/SampleForm.vue @@ -5,6 +5,7 @@ import SickForm from "@/modules/05_leave/componenst/Forms/01_SickForm.vue" import HelpWifeBirthForm from "@/modules/05_leave/componenst/Forms/04_HelpWifeBirthForm.vue" import VacationForm from "@/modules/05_leave/componenst/Forms/05_VacationForm.vue" import FollowSpouseForm from "@/modules/05_leave/componenst/Forms/12_FollowSpouseForm.vue" +import WorkInternationalForm from "@/modules/05_leave/componenst/Forms/11_WorkInternationalForm.vue" const type = ref(0) const typeOption = reactive([ { id: 0, name: "" }, @@ -14,6 +15,7 @@ const typeOption = reactive([ { id: 4, name: "ลาไปช่วยเหลือภริยาที่คลอดบุตร" }, { id: 5, name: "ลาพักผ่อน" }, { id: 6, name: "ลาติดตามคู่สมรส" }, + { id: 7, name: "ลาไปปฏิบัติงานในองค์การระหว่างประเทศ" }, ]) async function onSubmit() { @@ -47,6 +49,7 @@ watch( +