แก้ เครื่องราชอิสริยาภรณ์

This commit is contained in:
setthawutttty 2024-02-12 17:02:35 +07:00
parent f685da61a0
commit c3c27e9f8c
2 changed files with 12 additions and 12 deletions

View file

@ -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<string>();
const section = ref<string>();
const page = ref<string>();
const receiveDate = ref<Date>(new Date());
const dateAnnounce = ref<Date | null>(null);
const dateAnnounce = ref<Date | null|string>(null);
const refCommandNo = ref<string>();
const refCommandDate = ref<Date | null>(new Date());
const refCommandDate = ref<Date | null|string>(new Date());
const myForm = ref<any>(); //form data input
const edit = ref<boolean>(false); // dialog
const modal = ref<boolean>(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();
};

View file

@ -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;
}