แก้ไขปี การเพิ่มรอบการเสนอขอพระราชทานเครื่องราชอิสริยาภรณ์
This commit is contained in:
parent
01f23e51f8
commit
c812866dce
2 changed files with 13 additions and 7 deletions
|
|
@ -77,6 +77,7 @@ const fileUploadDoc = async (files: any) => {
|
||||||
|
|
||||||
const updateYear = async (e: number) => {
|
const updateYear = async (e: number) => {
|
||||||
yearly.value = e;
|
yearly.value = e;
|
||||||
|
await updateDateRange();
|
||||||
};
|
};
|
||||||
// แก้ไขข้อมูล
|
// แก้ไขข้อมูล
|
||||||
|
|
||||||
|
|
@ -104,11 +105,11 @@ const SaveData = async () => {
|
||||||
// อัพเดทวันที่เริ่มต้น และ สิ้นสุด
|
// อัพเดทวันที่เริ่มต้น และ สิ้นสุด
|
||||||
const updateDateRange = () => {
|
const updateDateRange = () => {
|
||||||
if (roundInsig.value.value == 1) {
|
if (roundInsig.value.value == 1) {
|
||||||
dateStart.value = new Date(new Date().getFullYear(), 9, 1);
|
dateStart.value = new Date(yearly.value, 9, 1);
|
||||||
dateEnd.value = new Date(new Date().getFullYear() + 1, 3, 29);
|
dateEnd.value = new Date(yearly.value + 1, 3, 29);
|
||||||
} else if (roundInsig.value.value == 2) {
|
} else if (roundInsig.value.value == 2) {
|
||||||
dateStart.value = new Date(new Date().getFullYear(), 3, 29);
|
dateStart.value = new Date(yearly.value + 1, 3, 29);
|
||||||
dateEnd.value = new Date(new Date().getFullYear(), 4, 29);
|
dateEnd.value = new Date(yearly.value + 1, 4, 29);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// เพิ่มข้อมูลรอบการเสนอขอพระราชทานเครื่องราชฯ
|
// เพิ่มข้อมูลรอบการเสนอขอพระราชทานเครื่องราชฯ
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,10 @@ const fetchData = async () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// redirect หน้าข้อมูลรอบการเสนอข้อ
|
// redirect หน้าข้อมูลรอบการเสนอข้อ
|
||||||
const clickEdit = (col: any) => {
|
interface Col {
|
||||||
|
period_id: string;
|
||||||
|
}
|
||||||
|
const clickEdit = (col: Col) => {
|
||||||
router.push(`/insignia/round-add/${col.period_id}`);
|
router.push(`/insignia/round-add/${col.period_id}`);
|
||||||
};
|
};
|
||||||
// ยืนยันการลบรอบการเสนอขอ
|
// ยืนยันการลบรอบการเสนอขอ
|
||||||
|
|
@ -172,10 +175,12 @@ const getRequest = async (id: string) => {
|
||||||
|
|
||||||
// ค้นหาในตาราง
|
// ค้นหาในตาราง
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
const filterRef = ref<any>(null);
|
const filterRef = ref<HTMLInputElement | null>(null);
|
||||||
const resetFilter = () => {
|
const resetFilter = () => {
|
||||||
filterKeyword.value = "";
|
filterKeyword.value = "";
|
||||||
filterRef.value.focus();
|
if (filterRef.value) {
|
||||||
|
filterRef.value.focus();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const attrs = ref<any>(useAttrs());
|
const attrs = ref<any>(useAttrs());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue