no message
This commit is contained in:
parent
1b6157165a
commit
a8dc849917
3 changed files with 34 additions and 7 deletions
|
|
@ -5,7 +5,7 @@ const retirement = `${env.API_URI}/retirement`
|
|||
export default {
|
||||
profile: (type: string, year: number) => `${retirement}/profile/${type}/${year}`,
|
||||
profileRetire: (retireId: string) => `${retirement}/profile/${retireId}`,
|
||||
getprofileRetire: (retireId: string) => `${retirement}/${retireId}`,
|
||||
listRetire: (retireId: string) => `${retirement}/${retireId}`,
|
||||
createnote: () => `${retirement}/reason/`,
|
||||
reasonId: (retireId:string) => `${retirement}/reason/${retireId}`,
|
||||
retirement:(type:string) => `${retirement}/${type}/2023`
|
||||
|
|
|
|||
|
|
@ -102,12 +102,12 @@ const rows = ref<any>([
|
|||
const filter = ref<string>("");
|
||||
watch(modal, () => {
|
||||
if (modal.value === true) {
|
||||
fecthProfile();
|
||||
fecthlistRetire();
|
||||
}
|
||||
});
|
||||
const fecthProfile = async () => {
|
||||
const fecthlistRetire= async () => {
|
||||
await http
|
||||
.get(config.API.getprofileRetire("1234"))
|
||||
.get(config.API.listRetire("1234"))
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
})
|
||||
|
|
@ -136,7 +136,7 @@ const clickAdd = () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
fecthProfile();
|
||||
fecthlistRetire();
|
||||
});
|
||||
})
|
||||
.onCancel(() => {})
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ const visibleColumns = ref<any>([
|
|||
const filter = ref<string>("");
|
||||
|
||||
const clickDelete = (prop: any) => {
|
||||
console.log(prop);
|
||||
// console.log(prop);
|
||||
$q.dialog({
|
||||
title: "ยืนยันการลบข้อมูล",
|
||||
message: "ต้องการลบข้อมูลนี้ใช่หรือไม่?",
|
||||
|
|
@ -278,6 +278,33 @@ const visibleNote = computed(() => {
|
|||
return true;
|
||||
}
|
||||
});
|
||||
const saveList = () => {
|
||||
$q.dialog({
|
||||
title: "ยืนยันกาบันทึกข้อมูล",
|
||||
message: "ต้องการบันทึกข้อมูลนี้ใช่หรือไม่?",
|
||||
cancel: {
|
||||
flat: true,
|
||||
color: "negative",
|
||||
},
|
||||
persistent: true,
|
||||
})
|
||||
.onOk(async () => {
|
||||
const retireld = "1233444";
|
||||
await http
|
||||
.post(config.API.listRetire("123"), { retireld: retireld })
|
||||
.then(() => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
fecthlist();
|
||||
});
|
||||
})
|
||||
.onCancel(() => {})
|
||||
.onDismiss(() => {});
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -298,7 +325,7 @@ const visibleNote = computed(() => {
|
|||
<q-card class="col-12 q-pa-md">
|
||||
<q-toolbar>
|
||||
<AddList />
|
||||
<q-btn flat round color="blue-12" icon="save">
|
||||
<q-btn flat round color="blue-12" icon="save" @click="saveList">
|
||||
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn color="primary" flat round icon="download">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue