fix === > แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย ทุกระบบ
This commit is contained in:
parent
bcd5d1d56c
commit
d9bb320b16
17 changed files with 514 additions and 348 deletions
|
|
@ -8,19 +8,15 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
/**
|
||||
* importType
|
||||
*/
|
||||
/** importType */
|
||||
import type { QForm } from "quasar";
|
||||
import type { MainData } from "@/modules/05_placement/interface/index/Main";
|
||||
import type {
|
||||
appointmentData,
|
||||
ResponseData,
|
||||
DataProfile,
|
||||
} from "@/modules/05_placement/interface/response/AppointMent";
|
||||
|
||||
/**
|
||||
* importComponents
|
||||
*/
|
||||
/** importComponents*/
|
||||
import CardProfile from "@/components/CardProfile.vue"; // card ข้อมูลส่วนตัว
|
||||
|
||||
const $q = useQuasar();
|
||||
|
|
@ -38,7 +34,6 @@ const {
|
|||
} = mixin;
|
||||
|
||||
const dataProfile = ref<DataProfile>(); //ข้อมุลส่วนตัว
|
||||
|
||||
const appointment = ref<appointmentData>({
|
||||
citizenId: "",
|
||||
prefixId: "",
|
||||
|
|
@ -58,17 +53,17 @@ const date = ref<Date | null>(null); //ดำรงตำแหน่งใน
|
|||
const reason = ref<string>(""); //หมายเหตุ
|
||||
const status = ref<string>("");
|
||||
const fullName = ref<string>("");
|
||||
const mianData = ref<MainData>();
|
||||
|
||||
/**
|
||||
* fetch รายละเอียดการปรับระดับชั้นงานลูกจ้าง
|
||||
*/
|
||||
/** fetch รายละเอียดการปรับระดับชั้นงานลูกจ้าง*/
|
||||
async function fecthappointmentByid() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.appointEmployeeByid(paramsId.toString()))
|
||||
.then((res: ResponseData) => {
|
||||
.then((res) => {
|
||||
dataProfile.value = res.data.result as unknown as DataProfile;
|
||||
const data = res.data.result;
|
||||
mianData.value = res.data.result;
|
||||
appointment.value = data;
|
||||
profileId.value = data.profileId;
|
||||
fullName.value = `${data.prefix === null ? "" : data.prefix}${
|
||||
|
|
@ -93,9 +88,7 @@ async function fecthappointmentByid() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ยืนยันการบันทึกข้อมูลเพื่อลงบัญชีแนบท้าย
|
||||
*/
|
||||
/** ยืนยันการบันทึกข้อมูลเพื่อลงบัญชีแนบท้าย*/
|
||||
function clickSave() {
|
||||
if (myForm.value !== null) {
|
||||
myForm.value.validate().then((result: any) => {
|
||||
|
|
@ -140,27 +133,33 @@ function clickSave() {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ยกเลิกการบันทึกข้อมูลเพื่อลงบัญชีแนบท้าย
|
||||
*/
|
||||
function cancel() {
|
||||
/** ยกเลิกการบันทึกข้อมูลเพื่อลงบัญชีแนบท้าย*/
|
||||
async function cancel() {
|
||||
edit.value = false;
|
||||
fecthappointmentByid();
|
||||
const data = mianData.value;
|
||||
if (data) {
|
||||
educationOld.value = data.educationOld ?? "-";
|
||||
organizationPositionOld.value = data.organizationPositionOld;
|
||||
positionTypeOld.value = data.positionTypeOld;
|
||||
positionLevelOld.value = data.positionLevelOld;
|
||||
posNo.value = data.positionNumberOld;
|
||||
salary.value = data.salary ?? 0;
|
||||
reason.value = data.reason;
|
||||
date.value = data.positionDate;
|
||||
}
|
||||
myForm.value?.resetValidation();
|
||||
}
|
||||
|
||||
/**
|
||||
* Class input
|
||||
*/
|
||||
const getClass = (val: boolean) => {
|
||||
/** Class inpu*/
|
||||
function getClass(val: boolean) {
|
||||
return {
|
||||
"full-width inputgreen cursor-pointer": val,
|
||||
"full-width cursor-pointer": !val,
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fecthappointmentByid();
|
||||
onMounted(async () => {
|
||||
await fecthappointmentByid();
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
|
|
@ -176,7 +175,7 @@ onMounted(() => {
|
|||
class="q-mr-sm"
|
||||
@click="router.push(`/placement/appoint-employee`)"
|
||||
/>
|
||||
รายละเอียดการปรับระดับชั้นงานลูกจ้าง{{ fullName }}
|
||||
รายละเอียดการปรับระดับชั้นงานลูกจ้าง {{ fullName }}
|
||||
</div>
|
||||
|
||||
<CardProfile :data="dataProfile as DataProfile" :type="'employee'" />
|
||||
|
|
@ -322,24 +321,7 @@ onMounted(() => {
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-xs-6 col-sm-3 row">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
v-model="salary"
|
||||
:outlined="edit"
|
||||
dense
|
||||
:readonly="!edit"
|
||||
hide-bottom-space
|
||||
:borderless="!edit"
|
||||
:label="`${'เงินเดือน'}`"
|
||||
:rules="[(val:number) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||
lazy-rules
|
||||
mask="###,###,###,###"
|
||||
reverse-fill-mask
|
||||
:class="getClass(edit)"
|
||||
/>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<div class="col-xs-6 col-sm-6 row items-center">
|
||||
<div class="col-12">
|
||||
|
|
@ -364,7 +346,7 @@ onMounted(() => {
|
|||
:borderless="!edit"
|
||||
:readonly="!edit"
|
||||
:model-value="date !== null ? date2Thai(date) : null"
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
||||
:rules="edit ? [(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]: []"
|
||||
hide-bottom-space
|
||||
:label="`${'ดำรงตำแหน่งในระดับปัจจุบันเมื่อ'}`"
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue