fixing เมนูบรรจุ อื่นๆ

This commit is contained in:
Warunee Tamkoo 2024-05-15 14:59:57 +07:00
parent 45760996be
commit 7a394bce3a
2 changed files with 19 additions and 28 deletions

View file

@ -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

View file

@ -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>