ข้อความเตือน เครื่องราชฯ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-09-04 18:15:00 +07:00
parent 3d4e47ca8c
commit 542f4d332e
3 changed files with 114 additions and 49 deletions

View file

@ -33,24 +33,33 @@ const personId = ref<string>();
const profileType = ref<string>("");
const fileResult = ref<any>(null);
const fileinvoice = ref<any>(null);
const loadView = ref<boolean>(false);
onMounted(async () => {
await fecthRound();
await fecthInsignia();
await fecthInsigniaType();
// await fecthInsignia();
// await fecthInsigniaType();
});
const fecthRound = async () => {
showLoader();
await http
.get(config.API.noteround())
.then((res) => {
.then(async (res) => {
let data = res.data.result;
selectRoundOption.value = data.map((e: any) => ({
name: "รอบการเสนอขอพระราชทานเครื่องราชปี" + " " + (e.year + 543),
id: e.id,
}));
selectRound.value = data[0].id;
if (data.length !== 0) {
selectRoundOption.value = data.map((e: any) => ({
name: "รอบการเสนอขอพระราชทานเครื่องราชปี" + " " + (e.year + 543),
id: e.id,
}));
selectRound.value = data[0].id;
await fecthInsignia();
await fecthInsigniaType();
}
})
.catch((err) => {
console.log(err);
})
.finally(() => {
hideLoader();
});
};
const fecthInsignia = async () => {
@ -62,6 +71,7 @@ const fecthInsignia = async () => {
})
.catch((err) => {
messageError($q, err);
console.log("fecthInsignia");
});
};
const fecthInsigniaType = async () => {
@ -70,9 +80,12 @@ const fecthInsigniaType = async () => {
let data = res.data.result;
DataStore.fetchDatainsigniaType(data);
tab.value = DataStore.insigniaType[0].name;
loadView.value = true;
})
.catch((err) => {
messageError($q, err);
console.log("fecthInsigniaType");
});
};
const visibleColumns = ref<String[]>([
@ -375,7 +388,12 @@ const paginationLabel = (start: number, end: number, total: number) => {
<div class="toptitle text-dark col-12 row items-center">
นทกผลการไดบพระราชทานเครองราชอสรยาภรณ/การจายใบกำก
</div>
<q-card flat bordered class="col-12 q-my-md q-mt-sm rounded-borders">
<q-card
flat
bordered
class="col-12 q-my-md q-mt-sm rounded-borders"
v-if="loadView == true"
>
<div class="bg-grey-1 col-12 row items-center">
<div class="q-pl-md q-pr-sm text-weight-medium text-grey-7">รอบ</div>
<div>
@ -655,6 +673,13 @@ const paginationLabel = (start: number, end: number, total: number) => {
:profileType="profileType"
/>
</q-card>
<q-card v-else>
<div class="q-pa-md q-gutter-sm">
<q-banner inline-actions rounded class="bg-grey-1 text-center">
ไมอมลรอบการเสนอขอพระราชทานเครองราชอสรยาภรณ
</q-banner>
</div>
</q-card>
<q-dialog v-model="modelPerview">
<q-card style="width: 850px; max-width: 80vw">