ข้อความเตือน เครื่องราชฯ
This commit is contained in:
parent
3d4e47ca8c
commit
542f4d332e
3 changed files with 114 additions and 49 deletions
|
|
@ -12,7 +12,8 @@ import DialogEdit from "@/modules/07_insignia/components/4_Allocate/DialogEdit.v
|
|||
|
||||
import type { OptionDataYear } from "@/modules/07_insignia/interface/index/Main";
|
||||
import type { QTableProps, QInput } from "quasar";
|
||||
import { useQuasar } from "quasar";
|
||||
import { Loading, useQuasar } from "quasar";
|
||||
import type { load } from "@/router/loader";
|
||||
|
||||
const DataStore = useAllocateDataStore();
|
||||
const mixin = useCounterMixin();
|
||||
|
|
@ -45,24 +46,28 @@ const profileType = ref<string>("");
|
|||
const filterKeyword = ref<string>("");
|
||||
const roundYear = ref<number>();
|
||||
const insigniaOp = ref<any>([]);
|
||||
const loadView = ref<boolean>(false);
|
||||
|
||||
onMounted(async () => {
|
||||
await fecthRound();
|
||||
await fecthInsigniaType();
|
||||
// await fecthInsigniaType();
|
||||
});
|
||||
|
||||
const fecthRound = async () => {
|
||||
await http
|
||||
.get(config.API.noteround())
|
||||
.then((res) => {
|
||||
.then(async (res) => {
|
||||
let data = res.data.result;
|
||||
selectRoundOption.value = data.map((e: any) => ({
|
||||
id: e.id,
|
||||
name: "รอบการเสนอขอพระราชทานเครื่องราชปี" + " " + (e.year + 543),
|
||||
year: e.year,
|
||||
}));
|
||||
selectRound.value = data[0].id;
|
||||
roundYear.value = data[0].year;
|
||||
if (data.length !== 0) {
|
||||
selectRoundOption.value = data.map((e: any) => ({
|
||||
id: e.id,
|
||||
name: "รอบการเสนอขอพระราชทานเครื่องราชปี" + " " + (e.year + 543),
|
||||
year: e.year,
|
||||
}));
|
||||
selectRound.value = data[0].id;
|
||||
roundYear.value = data[0].year;
|
||||
await fecthInsigniaType();
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -92,6 +97,7 @@ const fecthInsigniaType = async () => {
|
|||
let data = res.data.result;
|
||||
DataStore.fetchDatainsigniaType(data);
|
||||
tab.value = DataStore.insigniaType[0].name;
|
||||
loadView.value = true;
|
||||
fecthInsignia();
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
@ -281,7 +287,12 @@ const resetFilter = () => {
|
|||
<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"
|
||||
>
|
||||
<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>
|
||||
<selector
|
||||
|
|
@ -520,6 +531,14 @@ const resetFilter = () => {
|
|||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</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>
|
||||
|
||||
<DialogForm
|
||||
:modal="modal"
|
||||
:save="save"
|
||||
|
|
@ -535,5 +554,4 @@ const resetFilter = () => {
|
|||
:actionType="actionType"
|
||||
/>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
<style lang="scss" scoped></style>
|
||||
|
|
|
|||
|
|
@ -26,42 +26,50 @@ const action = ref<string>("");
|
|||
const profileId = ref<string>("");
|
||||
const roundYear = ref<any>();
|
||||
const insigniaList = ref<any>([]);
|
||||
const loadView = ref<boolean>(false);
|
||||
|
||||
onMounted(async () => {
|
||||
await fecthRound();
|
||||
await fecthInsigniaType();
|
||||
// await fecthInsigniaType();
|
||||
});
|
||||
const fecthRound = async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.noteround())
|
||||
.then((res) => {
|
||||
.then(async (res) => {
|
||||
let data = res.data.result;
|
||||
selectRoundAllOption.value = [
|
||||
{
|
||||
name: "ทั้งหมด",
|
||||
id: "0",
|
||||
year: 0,
|
||||
},
|
||||
];
|
||||
data.map((e: any) => {
|
||||
selectRoundOption.value.push({
|
||||
name: "รอบการเสนอขอพระราชทานเครื่องราชปี" + " " + (e.year + 543),
|
||||
id: e.id,
|
||||
year: e.year,
|
||||
if (data.length !== 0) {
|
||||
await fecthInsigniaType();
|
||||
selectRoundAllOption.value = [
|
||||
{
|
||||
name: "ทั้งหมด",
|
||||
id: "0",
|
||||
year: 0,
|
||||
},
|
||||
];
|
||||
data.map((e: any) => {
|
||||
selectRoundOption.value.push({
|
||||
name: "รอบการเสนอขอพระราชทานเครื่องราชปี" + " " + (e.year + 543),
|
||||
id: e.id,
|
||||
year: e.year,
|
||||
});
|
||||
selectRoundAllOption.value.push({
|
||||
name: "รอบการเสนอขอพระราชทานเครื่องราชปี" + " " + (e.year + 543),
|
||||
id: e.id,
|
||||
year: e.year,
|
||||
});
|
||||
});
|
||||
selectRoundAllOption.value.push({
|
||||
name: "รอบการเสนอขอพระราชทานเครื่องราชปี" + " " + (e.year + 543),
|
||||
id: e.id,
|
||||
year: e.year,
|
||||
});
|
||||
});
|
||||
|
||||
selectRound.value = data[0].id;
|
||||
yearRound.value = data[0].year;
|
||||
roundYear.value = data[0].year;
|
||||
selectRound.value = data[0].id;
|
||||
yearRound.value = data[0].year;
|
||||
roundYear.value = data[0].year;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -73,7 +81,7 @@ const fecthInsignia = async () => {
|
|||
DataStore.fetchDataInsignia(data);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(async () => {
|
||||
insigniaList.value = await DataStore.insigniaOp.filter(
|
||||
|
|
@ -88,11 +96,13 @@ const fecthInsigniaType = async () => {
|
|||
let data = res.data.result;
|
||||
DataStore.fetchDatainsigniaType(data);
|
||||
tab.value = DataStore.insigniaType[0].name;
|
||||
loadView.value = true;
|
||||
await fecthInsignia();
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {});
|
||||
};
|
||||
|
||||
const visibleColumns = ref<String[]>([
|
||||
|
|
@ -367,7 +377,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 == tr"
|
||||
>
|
||||
<q-tabs
|
||||
dense
|
||||
v-model="tab"
|
||||
|
|
@ -553,6 +568,13 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
|||
:type-id="tab"
|
||||
/>
|
||||
</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>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.arrow {
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue