fixing เมนูบรรจุ อื่นๆ
This commit is contained in:
parent
45760996be
commit
7a394bce3a
2 changed files with 19 additions and 28 deletions
|
|
@ -6,20 +6,13 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
import keycloak from "@/plugins/keycloak";
|
||||
|
||||
import type { ResponseDataDetail } from "@/modules/05_placement/interface/response/Transfer";
|
||||
import type {
|
||||
OtherdataInterface,
|
||||
resApiData,
|
||||
} from "@/modules/05_placement/interface/response/OhterMain";
|
||||
import type { resApiData } from "@/modules/05_placement/interface/response/OhterMain";
|
||||
import type { QForm } from "quasar";
|
||||
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
|
||||
|
||||
/** importComponents*/
|
||||
|
||||
|
||||
import CardProfile from "@/components/CardProfile.vue";
|
||||
import CurruncyInput from "@/components/CurruncyInput.vue";
|
||||
|
||||
/** importStore*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
|
|
@ -102,7 +95,7 @@ const onSubmit = async () => {
|
|||
positionTypeOld: positionTypeOld.value,
|
||||
positionLevelOld: positionLevelOld.value,
|
||||
positionNumberOld: posNo.value,
|
||||
amountOld: Number(salary.value),
|
||||
amountOld: salary.value.toString().replace(/,/g, ""),
|
||||
positionDate: date.value,
|
||||
militaryDate: militaryDate.value,
|
||||
reason: reason.value,
|
||||
|
|
@ -145,6 +138,7 @@ onMounted(async () => {
|
|||
await fetchData();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="toptitle text-dark col-12 row items-center">
|
||||
<q-btn
|
||||
|
|
|
|||
|
|
@ -186,22 +186,6 @@ const fecthTypeOption = async () => {
|
|||
});
|
||||
};
|
||||
|
||||
//----(ลบข้อมูลจากไอดี)------//
|
||||
const deleteOther = async (id: string) => {
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.otherByid(id))
|
||||
.then(() => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
fecthlistOthet();
|
||||
});
|
||||
};
|
||||
|
||||
//----(รีเซ็ตข้อมูลในช่อง input)------//
|
||||
const resetFilter = () => {
|
||||
filterKeyword.value = "";
|
||||
|
|
@ -224,10 +208,23 @@ const clickClose = () => {
|
|||
|
||||
//----(เปิด Dialog ลบข้อมูล)------//
|
||||
const clickDelete = (id: string) => {
|
||||
dialogRemove($q, () => deleteOther(id));
|
||||
dialogRemove($q, async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.otherByid(id))
|
||||
.then(() => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
fecthlistOthet();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
//----(เปิดหน้าถัดไป)------//
|
||||
//----(เปิดหน้ารายละเอียด)------//
|
||||
const nextPage = (id: string) => {
|
||||
router.push({
|
||||
path: `/other/detail/${id}`,
|
||||
|
|
@ -351,7 +348,7 @@ onMounted(() => {
|
|||
class="text-red-14"
|
||||
icon="mdi-delete"
|
||||
dense
|
||||
@click.stop="clickDelete(props.row.personalId)"
|
||||
@click.stop="clickDelete(props.row.id)"
|
||||
><q-tooltip>ลบข้อมูล</q-tooltip></q-btn
|
||||
>
|
||||
</q-td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue