From d15a24c80e2983cbe6b1675b1044444c87ae08b6 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Fri, 1 Mar 2024 10:30:04 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=83=E0=B8=AB?= =?UTF-8?q?=E0=B8=A1=E0=B9=88=20=E0=B8=A7=E0=B8=B1=E0=B8=99=E0=B8=97?= =?UTF-8?q?=E0=B8=B5=E0=B9=88=E0=B9=80=E0=B8=A3=E0=B8=B4=E0=B9=88=E0=B8=A1?= =?UTF-8?q?=E0=B8=95=E0=B9=89=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/SalaryChart/DialogFormMain.vue | 22 ++++++++++--------- src/modules/13_salary/interface/index/Main.ts | 14 +++++++++++- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/modules/13_salary/components/SalaryChart/DialogFormMain.vue b/src/modules/13_salary/components/SalaryChart/DialogFormMain.vue index a8196f64b..38ada04f5 100644 --- a/src/modules/13_salary/components/SalaryChart/DialogFormMain.vue +++ b/src/modules/13_salary/components/SalaryChart/DialogFormMain.vue @@ -8,6 +8,7 @@ import config from "@/app.config"; import type { DataOption, ObjectSalaryRef, + FormData } from "@/modules/13_salary/interface/index/Main"; import type { SalaryPosType, @@ -46,14 +47,14 @@ const props = defineProps({ }); const salaryId = ref(""); -const formData = reactive({ +const formData = reactive({ salaryType: "", //*ประเภทผัง (OFFICER->"ข้าราชการกรุงเทพมหานครสามัญ",EMPLOYEE->"ลูกจ้างประจำกรุงเทพมหานคร") posTypeId: "", //*ประเภทของตำแหน่ง posLevelId: "", //*ระดับของตำแหน่ง isActive: false, //*สถานะการใช้งาน - date: new Date(), //ให้ไว้ ณ วันที่ - startDate: new Date(), //วันที่มีผลบังคับใช้ - endDate: new Date(), //วันที่สิ้นสุดบังคับใช้ + date: null, //ให้ไว้ ณ วันที่ + startDate: null, //วันที่มีผลบังคับใช้ + endDate: null, //วันที่สิ้นสุดบังคับใช้ details: "", //คำอธิบาย isSpecial: false, }); @@ -168,7 +169,11 @@ watch( if (salaryPosTypeOption.value.length === 0) { await fetchPosType(); } - + if (props.typeAction === "add") { + formData.date = new Date() + formData.startDate = new Date() + formData.endDate = new Date() + } if (props.typeAction === "edit") { await showLoader(); if (props.data) { @@ -237,9 +242,6 @@ function createSalary() { }); } - - - /** function checkEndDate*/ function checkEndDate() { if (formData.endDate !== null && formData.startDate !== null) { @@ -286,10 +288,10 @@ async function downloadFile(url: string, type: string, fileName: string) {
- +
-
+