From c3c27e9f8cb3c5e5b0dbd5d20d277dc452dd320a Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Mon, 12 Feb 2024 17:02:35 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20=E0=B9=80?= =?UTF-8?q?=E0=B8=84=E0=B8=A3=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=87=E0=B8=A3?= =?UTF-8?q?=E0=B8=B2=E0=B8=8A=E0=B8=AD=E0=B8=B4=E0=B8=AA=E0=B8=A3=E0=B8=B4?= =?UTF-8?q?=E0=B8=A2=E0=B8=B2=E0=B8=A0=E0=B8=A3=E0=B8=93=E0=B9=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../04_registry/components/Insignia.vue | 20 +++++++++---------- .../04_registry/interface/request/Insignia.ts | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/modules/04_registry/components/Insignia.vue b/src/modules/04_registry/components/Insignia.vue index 109a85c5f..79a35768a 100644 --- a/src/modules/04_registry/components/Insignia.vue +++ b/src/modules/04_registry/components/Insignia.vue @@ -309,7 +309,7 @@ dense lazy-rules :borderless="!edit" - :model-value="dateAnnounce ? date2Thai(dateAnnounce) : null" + :model-value="dateAnnounce ? date2Thai(dateAnnounce as Date) : null" hide-bottom-space :label="`${'วันที่ประกาศในราชกิจจาฯ'}`" > @@ -386,7 +386,7 @@ lazy-rules :borderless="!edit" :model-value=" - refCommandDate == null ? null : date2Thai(refCommandDate) + refCommandDate == null ? null : date2Thai(refCommandDate as Date) " hide-bottom-space :label="`${'เอกสารอ้างอิง (ลงวันที่)'}`" @@ -526,9 +526,9 @@ const volume = ref(); const section = ref(); const page = ref(); const receiveDate = ref(new Date()); -const dateAnnounce = ref(null); +const dateAnnounce = ref(null); const refCommandNo = ref(); -const refCommandDate = ref(new Date()); +const refCommandDate = ref(new Date()); const myForm = ref(); //form data input const edit = ref(false); //เช็คการกดปุ่มแก้ไขใน dialog const modal = ref(false); //modal add detail @@ -1102,10 +1102,10 @@ const saveData = async () => { section: section.value, page: page.value, receiveDate: dateToISO(receiveDate.value), - dateAnnounce: dateAnnounce.value ? dateToISO(dateAnnounce.value) : null, + dateAnnounce: dateAnnounce.value ? dateToISO(dateAnnounce.value as Date) : null, refCommandNo: refCommandNo.value, refCommandDate: - refCommandDate.value == null ? null : dateToISO(refCommandDate.value), + refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date), }) .then((res) => { success($q, "บันทึกข้อมูลสำเร็จ"); @@ -1138,10 +1138,10 @@ const editData = async () => { section: section.value, page: page.value, receiveDate: dateToISO(receiveDate.value), - dateAnnounce: dateAnnounce.value ? dateToISO(dateAnnounce.value) : null, + dateAnnounce: dateAnnounce.value ? dateToISO(dateAnnounce.value as Date) : null, refCommandNo: refCommandNo.value, refCommandDate: - refCommandDate.value == null ? null : dateToISO(refCommandDate.value), + refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date), }) .then((res) => { success($q, "บันทึกข้อมูลสำเร็จ"); @@ -1229,9 +1229,9 @@ const selectData = async (props: DataProps) => { section.value = props.row.section; page.value = props.row.page; receiveDate.value = props.row.receiveDate; - dateAnnounce.value = props.row.dateAnnounce; + dateAnnounce.value = props.row.dateAnnounce == '-' ? null:props.row.dateAnnounce; refCommandNo.value = props.row.refCommandNo; - refCommandDate.value = props.row.refCommandDate; + refCommandDate.value = props.row.refCommandDate == '-'? null:props.row.refCommandDate; id.value = props.row.id; await checkRowPage(); }; diff --git a/src/modules/04_registry/interface/request/Insignia.ts b/src/modules/04_registry/interface/request/Insignia.ts index f017b879d..1a6266697 100644 --- a/src/modules/04_registry/interface/request/Insignia.ts +++ b/src/modules/04_registry/interface/request/Insignia.ts @@ -17,9 +17,9 @@ interface RequestItemsObject { section: string; page: string; receiveDate: Date; - dateAnnounce: Date; + dateAnnounce: Date|string|null; refCommandNo: string; - refCommandDate: Date | null; + refCommandDate: Date | null|string; createdFullName: string; createdAt: Date; }