ปรับ ui เครื่องราชฯ เหรียญจักรพรรดิมาลา (รอบการเสนอขอ)

This commit is contained in:
setthawutttty 2023-08-16 13:59:25 +07:00
parent 6f951f6b29
commit 94e6134e56
9 changed files with 254 additions and 202 deletions

View file

@ -24,12 +24,16 @@
<div class="col-xs-12 col-sm-12 row">
<q-separator />
<div class="col-12 row q-pa-sm q-col-gutter-sm">
<q-input
<q-select
class="col-10"
dense
outlined
v-model="roundCoin"
label="รอบการเสนอขอพระราชทานเหรียญจักรพรรดิมาลา"
:options="options"
option-value="value"
option-label="label"
@update:model-value="updateDateRange"
/>
<datepicker
menu-class-name="modalfix"
@ -210,9 +214,12 @@ const dateEnd = ref<Date>(new Date());
const yearly = ref<number>(new Date().getFullYear());
const files = ref<any>();
const fileDocDataUpload = ref<File[]>([]);
const roundCoin = ref<string>("");
const roundCoin = ref<any>("");
const datelast = ref<number>(1);
const options = ref([
{label:"ครั้งที่ 1",value:1},
{label:"ครั้งที่ 2",value:2}
])
onMounted(async () => {
await fetchData();
});
@ -336,7 +343,18 @@ const checkSave = async () => {
// };
// return valueData;
// };
const updateDateRange = () => {
// console.log("test")
if (roundCoin.value.value == 1) {
dateStart.value = new Date(new Date().getFullYear(), 9, 1);
dateEnd.value = new Date(new Date().getFullYear() + 1, 3, 29);
console.log(1)
} else if (roundCoin.value.value == 2) {
dateStart.value = new Date(new Date().getFullYear(), 3, 29);
dateEnd.value = new Date(new Date().getFullYear() + 1, 6, 28);
console.log(2)
}
};
const addData = async () => {
const formData = new FormData();
formData.append("name", roundCoin.value);

View file

@ -216,7 +216,7 @@ const visibleColumns = ref<string[]>([
"year",
"startDate",
"endDate",
"status",
// "status",
"statusRoyal",
]); //