no message
This commit is contained in:
parent
7afbb2911a
commit
93855f6622
6 changed files with 66 additions and 9 deletions
|
|
@ -153,8 +153,8 @@ onMounted(async () => {
|
|||
<template>
|
||||
<div class="toptitle text-dark col-12 row items-center">
|
||||
<q-btn icon="mdi-arrow-left" unelevated round dense flat color="primary" class="q-mr-sm"
|
||||
@click="router.push(`/appoint-promote`)" />
|
||||
รายละเอียดการแต่งตั้ง-เลื่อน {{ title.fullname }}
|
||||
@click="router.push(`/appoint-employee`)" />
|
||||
รายละเอียดการแต่งตั้งลูกจ้างประจำ {{ title.fullname }}
|
||||
</div>
|
||||
<q-card bordered class="row col-12 text-dark">
|
||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ const createdAppoint = async () => {
|
|||
};
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.apppointmentReport(Type), data)
|
||||
.put(config.API.appointEmployeeOrder(Type), data)
|
||||
.then(() => {
|
||||
success($q, "บันทึกสำเร็จ");
|
||||
})
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ const Otherdata = ref<OtherdataInterface>({
|
|||
const avatar = ref<string>("");
|
||||
const educationOld = ref<string>("");
|
||||
const militaryDate = ref<Date | null>(null);
|
||||
const leaveDate = ref<Date | null>(null);
|
||||
|
||||
//-----(fetch data by id)-----//
|
||||
const fecthOther = async () => {
|
||||
|
|
@ -110,6 +111,7 @@ const fecthOther = async () => {
|
|||
reason.value = data.reason ?? "";
|
||||
educationOld.value = data.educationOld ?? "-";
|
||||
militaryDate.value = data.militaryDate ?? null;
|
||||
leaveDate.value = data.leaveDate ?? null;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -152,6 +154,7 @@ const saveOther = async () => {
|
|||
amountOld: Number(salary.value),
|
||||
educationOld: educationOld.value,
|
||||
militaryDate: militaryDate.value,
|
||||
leaveDate: leaveDate.value,
|
||||
};
|
||||
await http
|
||||
.put(config.API.otherByid(paramsId.toString()), data)
|
||||
|
|
@ -398,7 +401,7 @@ onMounted(async () => {
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<div class="col-xs-6 col-sm-6 row items-center">
|
||||
<div class="col-xs-6 col-sm-4 row items-center">
|
||||
<div class="col-12">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
|
|
@ -443,7 +446,56 @@ onMounted(async () => {
|
|||
</datepicker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6 row items-center">
|
||||
<div class="col-xs-6 col-sm-4 row items-center">
|
||||
<div class="col-12">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
:readonly="!edit"
|
||||
v-model="leaveDate"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
:model-value="
|
||||
leaveDate !== null ? date2Thai(leaveDate) : null
|
||||
"
|
||||
:rules="[
|
||||
(val) => !!val || `${'กรุณาเลือกวันออกจากราชการเมื่อ'}`,
|
||||
]"
|
||||
hide-bottom-space
|
||||
:label="`${'ออกจากราชการเมื่อ'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
:style="
|
||||
edit
|
||||
? 'color: var(--q-primary)'
|
||||
: 'color: var(--q-grey)'
|
||||
"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-4 row items-center">
|
||||
<div class="col-12">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
|
|
|
|||
|
|
@ -152,6 +152,7 @@ const fecthlistOthet = async () => {
|
|||
fullname: `${r.prefix ?? ""}${r.firstname ?? ""} ${r.lastname ?? ""}`,
|
||||
amountOld: r.amountOld,
|
||||
positionDate: r.positionDate,
|
||||
leaveDate: r.leaveDate,
|
||||
}));
|
||||
rows2.value = rows.value.filter(
|
||||
(e: listMain) =>
|
||||
|
|
@ -162,7 +163,8 @@ const fecthlistOthet = async () => {
|
|||
e.positionLevelOld &&
|
||||
e.positionNumberOld &&
|
||||
e.amountOld !== null &&
|
||||
e.positionDate
|
||||
e.positionDate &&
|
||||
e.leaveDate !== null
|
||||
);
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ const openModalOrder = () => {
|
|||
r.posNo &&
|
||||
r.salary !== null &&
|
||||
r.organization &&
|
||||
r.createdAt
|
||||
r.date
|
||||
);
|
||||
rows2.value = row;
|
||||
};
|
||||
|
|
@ -175,7 +175,7 @@ const getData = async () => {
|
|||
dateText:
|
||||
r.createdAt !== null ? date2Thai(new Date(r.createdAt)) : "-",
|
||||
createdAt: r.createdAt !== null ? new Date(r.createdAt) : null,
|
||||
date: new Date(),
|
||||
date: r.date,
|
||||
firstName: r.firstName ?? "",
|
||||
id: r.id ?? "",
|
||||
isActive: r.isActive ? r.isActive : false,
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@ interface listMain {
|
|||
statustext: string;
|
||||
createdAt: Date;
|
||||
amountOld: number;
|
||||
positionDate: Date
|
||||
positionDate: Date;
|
||||
leaveDate: Date
|
||||
}
|
||||
//ข้อมูลจาก api
|
||||
interface listMainAPI {
|
||||
|
|
@ -48,6 +49,7 @@ interface listMainAPI {
|
|||
createdAt: Date;
|
||||
amountOld: number;
|
||||
positionDate: Date
|
||||
leaveDate: Date
|
||||
}
|
||||
|
||||
interface OtherdataInterface {
|
||||
|
|
@ -97,6 +99,7 @@ interface resApiData {
|
|||
avatar: string;
|
||||
commandType: string;
|
||||
militaryDate: Date
|
||||
leaveDate: Date
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue