เครื่องราชฯ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-09-19 14:58:16 +07:00
parent 8ebbef05d9
commit 1530da36cf
22 changed files with 159 additions and 777 deletions

View file

@ -25,7 +25,7 @@ const {
const $q = useQuasar();
const tab = ref<string>("");
const selectRound = ref<string>();
const selectRound = ref<string>("");
const selectRoundOption = ref<OptionData[]>([]);
const modal = ref<boolean>(false);
const action = ref<string>("");
@ -36,9 +36,8 @@ const fileinvoice = ref<any>(null);
const loadView = ref<boolean>(false);
onMounted(async () => {
await fecthRound();
// await fecthInsignia();
// await fecthInsigniaType();
});
//
const fecthRound = async () => {
showLoader();
await http
@ -62,6 +61,7 @@ const fecthRound = async () => {
hideLoader();
});
};
//
const fecthInsignia = async () => {
await http
.get(config.API.insignia)
@ -71,9 +71,10 @@ const fecthInsignia = async () => {
})
.catch((err) => {
messageError($q, err);
console.log("fecthInsignia");
});
};
//
const fecthInsigniaType = async () => {
await http(config.API.insigniaType)
.then((res) => {
@ -137,7 +138,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "name",
align: "left",
label: "ชื่อ - สกุล",
label: "ชื่อ - นามสกุล",
field: "name",
sortable: true,
sort: (a: string, b: string) =>
@ -269,13 +270,18 @@ watch(modal, () => {
fecthlistInsignia();
}
});
//
const selectorInsignia = () => {
fecthlistInsignia();
};
//
const selectorRound = (round: string) => {
selectRound.value = round;
if (round) {
selectRound.value = round;
}
fecthlistInsignia();
};
// /
const fecthlistInsignia = async () => {
showLoader();
let data = {
@ -287,11 +293,9 @@ const fecthlistInsignia = async () => {
.post(config.API.noteSearch(), data)
.then((res) => {
let data = res.data.result;
console.log(data);
DataStore.fetchlistinsignia(data);
})
.catch((err) => {
console.log(err);
messageError($q, err);
})
.finally(() => {
@ -354,6 +358,7 @@ const modelPerview = ref<boolean>(false);
const rowspreview = ref<any>([]);
const typepreview = ref<string>("");
const fileInsignia = ref<any>(null);
// fileupload
const perviewfile = async (event: any, actionType: string) => {
showLoader();
typepreview.value = actionType;