ลูกจ้างประจำ
This commit is contained in:
parent
119a1b47e4
commit
c7bbe78fc7
7 changed files with 118 additions and 34 deletions
|
|
@ -20,6 +20,7 @@ import DialogUpdateCouple from "@/modules/04_registryPerson/components/Dialog/06
|
|||
const $q = useQuasar();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const routerName = ref<string>(route.name as string);
|
||||
const store = useRequestEditStore();
|
||||
const {
|
||||
dialogConfirm,
|
||||
|
|
@ -72,7 +73,13 @@ const isCheckData = computed(() => {
|
|||
async function fetchDataRequest() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.requestEdit + `${requestId.value}`)
|
||||
.get(
|
||||
config.API.requestEditByType(
|
||||
routerName.value == "registryNewRequestEditEMP/personal"
|
||||
? "-employee"
|
||||
: ""
|
||||
) + `${requestId.value}`
|
||||
)
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
dataRequest.value = data;
|
||||
|
|
@ -100,10 +107,17 @@ function onSubmit() {
|
|||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.patch(config.API.requestEdit + `${requestId.value}`, {
|
||||
status: formData.status,
|
||||
remark: formData.remark,
|
||||
})
|
||||
.patch(
|
||||
config.API.requestEditByType(
|
||||
routerName.value == "registryNewRequestEditEMP/personal"
|
||||
? "-employee"
|
||||
: ""
|
||||
) + `${requestId.value}`,
|
||||
{
|
||||
status: formData.status,
|
||||
remark: formData.remark,
|
||||
}
|
||||
)
|
||||
.then(async () => {
|
||||
await fetchDataRequest();
|
||||
await success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
|
|
@ -234,7 +248,7 @@ onMounted(async () => {
|
|||
|
||||
<template>
|
||||
<div class="q-gutter-sm q-pa-sm">
|
||||
<div class="toptitle text-dark row items-center q-py-xs ">
|
||||
<div class="toptitle text-dark row items-center q-py-xs">
|
||||
<q-btn
|
||||
icon="mdi-arrow-left"
|
||||
unelevated
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue