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 config from "@/app.config";
|
||||||
import keycloak from "@/plugins/keycloak";
|
import keycloak from "@/plugins/keycloak";
|
||||||
|
|
||||||
import type { ResponseDataDetail } from "@/modules/05_placement/interface/response/Transfer";
|
import type { resApiData } from "@/modules/05_placement/interface/response/OhterMain";
|
||||||
import type {
|
|
||||||
OtherdataInterface,
|
|
||||||
resApiData,
|
|
||||||
} from "@/modules/05_placement/interface/response/OhterMain";
|
|
||||||
import type { QForm } from "quasar";
|
import type { QForm } from "quasar";
|
||||||
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
|
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
|
||||||
|
|
||||||
/** importComponents*/
|
/** importComponents*/
|
||||||
|
|
||||||
|
|
||||||
import CardProfile from "@/components/CardProfile.vue";
|
import CardProfile from "@/components/CardProfile.vue";
|
||||||
import CurruncyInput from "@/components/CurruncyInput.vue";
|
|
||||||
|
|
||||||
/** importStore*/
|
/** importStore*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
|
@ -102,7 +95,7 @@ const onSubmit = async () => {
|
||||||
positionTypeOld: positionTypeOld.value,
|
positionTypeOld: positionTypeOld.value,
|
||||||
positionLevelOld: positionLevelOld.value,
|
positionLevelOld: positionLevelOld.value,
|
||||||
positionNumberOld: posNo.value,
|
positionNumberOld: posNo.value,
|
||||||
amountOld: Number(salary.value),
|
amountOld: salary.value.toString().replace(/,/g, ""),
|
||||||
positionDate: date.value,
|
positionDate: date.value,
|
||||||
militaryDate: militaryDate.value,
|
militaryDate: militaryDate.value,
|
||||||
reason: reason.value,
|
reason: reason.value,
|
||||||
|
|
@ -145,6 +138,7 @@ onMounted(async () => {
|
||||||
await fetchData();
|
await fetchData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
<q-btn
|
<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)------//
|
//----(รีเซ็ตข้อมูลในช่อง input)------//
|
||||||
const resetFilter = () => {
|
const resetFilter = () => {
|
||||||
filterKeyword.value = "";
|
filterKeyword.value = "";
|
||||||
|
|
@ -224,10 +208,23 @@ const clickClose = () => {
|
||||||
|
|
||||||
//----(เปิด Dialog ลบข้อมูล)------//
|
//----(เปิด Dialog ลบข้อมูล)------//
|
||||||
const clickDelete = (id: string) => {
|
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) => {
|
const nextPage = (id: string) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: `/other/detail/${id}`,
|
path: `/other/detail/${id}`,
|
||||||
|
|
@ -351,7 +348,7 @@ onMounted(() => {
|
||||||
class="text-red-14"
|
class="text-red-14"
|
||||||
icon="mdi-delete"
|
icon="mdi-delete"
|
||||||
dense
|
dense
|
||||||
@click.stop="clickDelete(props.row.personalId)"
|
@click.stop="clickDelete(props.row.id)"
|
||||||
><q-tooltip>ลบข้อมูล</q-tooltip></q-btn
|
><q-tooltip>ลบข้อมูล</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue