From 89810f47badcfd93554539ca6cc2eb5ea58747d5 Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Wed, 8 Nov 2023 15:14:36 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= =?UTF-8?q?=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( +