fix === > แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย ทุกระบบ
This commit is contained in:
parent
bcd5d1d56c
commit
d9bb320b16
17 changed files with 514 additions and 348 deletions
|
|
@ -98,7 +98,7 @@ onMounted(() => {
|
|||
class="q-mr-sm"
|
||||
@click="router.push(`/retirement/deceased`)"
|
||||
/>
|
||||
รายละเอียดบันทึกเวียนแจ้งการถึงแก่กรรม{{ fullName }}
|
||||
รายละเอียดบันทึกเวียนแจ้งการถึงแก่กรรม {{ fullName }}
|
||||
</div>
|
||||
|
||||
<CardProfile :data="dataProfile as DataProfile" />
|
||||
|
|
|
|||
|
|
@ -204,6 +204,7 @@ onMounted(async () => {
|
|||
await getData();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="toptitle text-dark col-12 row items-center">รายการให้ออก</div>
|
||||
<q-card flat bordered class="col-12 q-mt-sm">
|
||||
|
|
@ -256,7 +257,6 @@ onMounted(async () => {
|
|||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
|
||||
style="min-width: 140px"
|
||||
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ const organization = ref<string>("");
|
|||
const date = ref<Date | null>(null);
|
||||
const reason = ref<string>("");
|
||||
const dataProfile = ref<DataProfile>();
|
||||
const mainData = ref<any>();
|
||||
|
||||
const fullName = ref<string>("");
|
||||
const status = ref<string>("");
|
||||
|
|
@ -58,6 +59,7 @@ async function getData() {
|
|||
.get(config.API.outByid(dataId))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
mainData.value = res.data.result;
|
||||
dataProfile.value = data as DataProfile;
|
||||
fullName.value = `${data.prefix}${data.firstName ?? "-"} ${
|
||||
data.lastName ?? "-"
|
||||
|
|
@ -88,9 +90,23 @@ async function getData() {
|
|||
* ฟังก์ชั่น Cancle
|
||||
*/
|
||||
async function clickCancel() {
|
||||
await getData();
|
||||
edit.value = false;
|
||||
const data = mainData.value;
|
||||
if (data) {
|
||||
organizationPositionOld.value = data.organizationPositionOld
|
||||
? data.organizationPositionOld
|
||||
: findOrgName(data);
|
||||
|
||||
positionTypeOld.value = data.positionTypeOld ?? "";
|
||||
positionLevelOld.value = data.positionLevelOld ?? "";
|
||||
posNo.value = data.positionNumberOld ?? "";
|
||||
salary.value = data.salary ?? "";
|
||||
organization.value = data.organization ?? "";
|
||||
date.value = data.date !== null ? new Date(data.date) : null;
|
||||
reason.value = data.reason ?? "";
|
||||
}
|
||||
myForm.value?.resetValidation();
|
||||
// await getData();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -154,6 +170,7 @@ onMounted(async () => {
|
|||
await getData();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="toptitle text-dark col-12 row items-center">
|
||||
<q-btn
|
||||
|
|
@ -166,7 +183,7 @@ onMounted(async () => {
|
|||
class="q-mr-sm"
|
||||
@click="router.go(-1)"
|
||||
/>
|
||||
รายละเอียดการให้ออกของ {{ fullName }}
|
||||
รายละเอียดการให้ออก {{ fullName }}
|
||||
</div>
|
||||
|
||||
<CardProfile :data="dataProfile as DataProfile" />
|
||||
|
|
@ -295,24 +312,7 @@ onMounted(async () => {
|
|||
/>
|
||||
</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">
|
||||
<div class="col-12">
|
||||
|
|
@ -353,7 +353,7 @@ onMounted(async () => {
|
|||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
:model-value="date !== null ? date2Thai(date) : null"
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
||||
:rules="edit ? [(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]:[]"
|
||||
hide-bottom-space
|
||||
:label="`${'ตั้งแต่วัน'}`"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -295,8 +295,24 @@ async function rejectpopUp() {
|
|||
* กดยกเลิก
|
||||
*/
|
||||
async function clickCancel() {
|
||||
await fetchData(id.value);
|
||||
edit.value = false;
|
||||
const data = dataDetail.value;
|
||||
if (data) {
|
||||
organizationPositionOld.value = data.organizationPositionOld ?? "";
|
||||
positionTypeOld.value = data.positionTypeOld ?? "";
|
||||
positionLevelOld.value = data.positionLevelOld ?? "";
|
||||
posNo.value = data.positionNumberOld ?? "";
|
||||
salary.value = data.salary ? data.salary : 0;
|
||||
date.value = data.sendDate ? new Date(data.sendDate) : null;
|
||||
dateLeave.value = data.activeDate ? new Date(data.activeDate) : null;
|
||||
reason.value = data.reason ?? "";
|
||||
location.value = data.location ?? "";
|
||||
status.value = data.status ?? "";
|
||||
remarkHorizontal.value = data.remarkHorizontal ?? "-";
|
||||
isNoDebt.value = data.isNoDebt;
|
||||
isNoBurden.value = data.isNoBurden;
|
||||
isDiscipline.value = data.isDiscipline;
|
||||
}
|
||||
myForm.value?.resetValidation();
|
||||
}
|
||||
/**
|
||||
|
|
@ -540,8 +556,9 @@ onMounted(async () => {
|
|||
class="q-mr-sm"
|
||||
@click="router.push('/retirement/resign')"
|
||||
/>
|
||||
รายละเอียดการลาออกของ
|
||||
{{ dataDetail.firstName + " " + dataDetail.lastName }}
|
||||
รายละเอียดการลาออก {{
|
||||
dataDetail.prefix+dataDetail.firstName + " " + dataDetail.lastName
|
||||
}}
|
||||
</div>
|
||||
|
||||
<CardProfile :data="dataProfile as DataProfile" />
|
||||
|
|
@ -1298,10 +1315,10 @@ onMounted(async () => {
|
|||
dense
|
||||
:borderless="!edit"
|
||||
:model-value="date !== null ? date2Thai(date) : null"
|
||||
:rules="[
|
||||
:rules="edit ? [
|
||||
(val:string) =>
|
||||
!!val || `${'กรุณาเลือก วันที่ยื่นขอลาออกจากราชการ'}`,
|
||||
]"
|
||||
] : []"
|
||||
hide-bottom-space
|
||||
:label="`${' วันที่ยื่นขอลาออกจากราชการ'}`"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -1,24 +1,17 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, computed } from "vue";
|
||||
import axios from "axios";
|
||||
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { useQuasar, QForm } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import genReport from "@/plugins/genreport";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
import type {
|
||||
TypeFile,
|
||||
rowFile,
|
||||
FileList,
|
||||
} from "@/modules/06_retirement/interface/response/Main";
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
|
||||
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
|
||||
import CardProfile from "@/components/CardProfile.vue";
|
||||
import WorkFlow from "@/components/Workflow/Main.vue";
|
||||
|
||||
|
|
@ -34,9 +27,7 @@ const {
|
|||
showLoader,
|
||||
hideLoader,
|
||||
success,
|
||||
|
||||
dialogConfirm,
|
||||
dialogRemove,
|
||||
} = mixin;
|
||||
|
||||
/** ตัวแปร */
|
||||
|
|
@ -196,8 +187,24 @@ function onSubmit() {
|
|||
* กดยกเลิก
|
||||
*/
|
||||
async function clickCancel() {
|
||||
await fetchData(id.value);
|
||||
edit.value = false;
|
||||
const data = dataDetail.value;
|
||||
if (data) {
|
||||
organizationPositionOld.value = data.organizationPositionOld ?? "";
|
||||
positionTypeOld.value = data.positionTypeOld ?? "";
|
||||
positionLevelOld.value = data.positionLevelOld ?? "";
|
||||
posNo.value = data.positionNumberOld ?? "";
|
||||
salary.value = data.salary ? data.salary : 0;
|
||||
date.value = data.sendDate ? new Date(data.sendDate) : null;
|
||||
dateLeave.value = data.activeDate ? new Date(data.activeDate) : null;
|
||||
reason.value = data.reason ?? "";
|
||||
location.value = data.location ?? "";
|
||||
status.value = data.status ?? "";
|
||||
remarkHorizontal.value = data.remarkHorizontal ?? "-";
|
||||
isNoDebt.value = data.isNoDebt;
|
||||
isNoBurden.value = data.isNoBurden;
|
||||
isDiscipline.value = data.isDiscipline;
|
||||
}
|
||||
myForm.value?.resetValidation();
|
||||
}
|
||||
|
||||
|
|
@ -275,8 +282,8 @@ onMounted(async () => {
|
|||
class="q-mr-sm"
|
||||
@click="router.push('/retirement/resign')"
|
||||
/>
|
||||
รายละเอียดการยกเลิกลาออกของ{{
|
||||
dataDetail.firstName + " " + dataDetail.lastName
|
||||
รายละเอียดการยกเลิกลาออก {{
|
||||
dataDetail.prefix+dataDetail.firstName + " " + dataDetail.lastName
|
||||
}}
|
||||
</div>
|
||||
|
||||
|
|
@ -519,6 +526,7 @@ onMounted(async () => {
|
|||
<!-- แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย -->
|
||||
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||
<q-form
|
||||
class="col-12"
|
||||
ref="myForm"
|
||||
greedy
|
||||
@submit.prevent
|
||||
|
|
@ -529,6 +537,7 @@ onMounted(async () => {
|
|||
แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย
|
||||
</div>
|
||||
<q-space />
|
||||
|
||||
<div v-if="!checkRoutePermisson && workflowRef?.permission.isUpdate">
|
||||
<div class="q-gutter-sm" v-if="!edit">
|
||||
<q-btn
|
||||
|
|
@ -693,10 +702,10 @@ onMounted(async () => {
|
|||
dense
|
||||
:borderless="!edit"
|
||||
:model-value="date !== null ? date2Thai(date) : null"
|
||||
:rules="[
|
||||
:rules="edit ? [
|
||||
(val:string) =>
|
||||
!!val || `${'กรุณาเลือก วันที่ยื่นขอลาออกจากราชการ'}`,
|
||||
]"
|
||||
] : []"
|
||||
hide-bottom-space
|
||||
:label="`${' วันที่ยื่นขอลาออกจากราชการ'}`"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ const {
|
|||
showLoader,
|
||||
hideLoader,
|
||||
success,
|
||||
|
||||
dialogConfirm,
|
||||
dialogRemove,
|
||||
} = mixin;
|
||||
|
|
@ -295,9 +294,26 @@ async function rejectpopUp() {
|
|||
* กดยกเลิก
|
||||
*/
|
||||
async function clickCancel() {
|
||||
await fetchData(id.value);
|
||||
edit.value = false;
|
||||
const data = dataDetail.value;
|
||||
if (data) {
|
||||
organizationPositionOld.value = data.organizationPositionOld ?? "";
|
||||
positionTypeOld.value = data.positionTypeOld ?? "";
|
||||
positionLevelOld.value = data.positionLevelOld ?? "";
|
||||
posNo.value = data.positionNumberOld ?? "";
|
||||
salary.value = data.salary ? data.salary : 0;
|
||||
date.value = data.sendDate ? new Date(data.sendDate) : null;
|
||||
dateLeave.value = data.activeDate ? new Date(data.activeDate) : null;
|
||||
reason.value = data.reason ?? "";
|
||||
location.value = data.location ?? "";
|
||||
status.value = data.status ?? "";
|
||||
remarkHorizontal.value = data.remarkHorizontal ?? "-";
|
||||
isNoDebt.value = data.isNoDebt;
|
||||
isNoBurden.value = data.isNoBurden;
|
||||
isDiscipline.value = data.isDiscipline;
|
||||
}
|
||||
myForm.value?.resetValidation();
|
||||
// await fetchData(id.value);
|
||||
}
|
||||
/**
|
||||
* กดยกเลิก
|
||||
|
|
@ -309,9 +325,9 @@ async function clickCancelConditions() {
|
|||
|
||||
/** Function บันทึก รายการตรวจสอบเงื่อนไขต่างๆ*/
|
||||
function onSubmitConditions() {
|
||||
dialogConfirm($q, () => {
|
||||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.put(config.API.resignConditionsEMP(id.value), {
|
||||
isNoDebt: isNoDebt.value,
|
||||
isNoBurden: isNoBurden.value,
|
||||
|
|
@ -559,8 +575,9 @@ onMounted(async () => {
|
|||
class="q-mr-sm"
|
||||
@click="router.push('/retirement/resign-employee')"
|
||||
/>
|
||||
รายละเอียดการลาออกของ
|
||||
{{ dataDetail.firstName + " " + dataDetail.lastName }}
|
||||
รายละเอียดการลาออก {{
|
||||
dataDetail.prefix + dataDetail.firstName + " " + dataDetail.lastName
|
||||
}}
|
||||
</div>
|
||||
|
||||
<CardProfile :type="'employee'" :data="dataProfile as DataProfile" />
|
||||
|
|
@ -1147,6 +1164,7 @@ onMounted(async () => {
|
|||
แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย
|
||||
</div>
|
||||
<q-space />
|
||||
|
||||
<div
|
||||
v-if="
|
||||
!checkRoutePermisson &&
|
||||
|
|
@ -1317,10 +1335,10 @@ onMounted(async () => {
|
|||
dense
|
||||
:borderless="!edit"
|
||||
:model-value="date !== null ? date2Thai(date) : null"
|
||||
:rules="[
|
||||
:rules="edit ? [
|
||||
(val:string) =>
|
||||
!!val || `${'กรุณาเลือก วันที่ยื่นขอลาออกจากราชการ'}`,
|
||||
]"
|
||||
] : []"
|
||||
hide-bottom-space
|
||||
:label="`${' วันที่ยื่นขอลาออกจากราชการ'}`"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -195,12 +195,26 @@ function onSubmit() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* กดยกเลิก
|
||||
*/
|
||||
/** กดยกเลิก*/
|
||||
async function clickCancel() {
|
||||
await fetchData(id.value);
|
||||
edit.value = false;
|
||||
const data = dataDetail.value;
|
||||
if (data) {
|
||||
organizationPositionOld.value = data.organizationPositionOld ?? "";
|
||||
positionTypeOld.value = data.positionTypeOld ?? "";
|
||||
positionLevelOld.value = data.positionLevelOld ?? "";
|
||||
posNo.value = data.positionNumberOld ?? "";
|
||||
salary.value = data.salary ? data.salary : 0;
|
||||
date.value = data.sendDate ? new Date(data.sendDate) : null;
|
||||
dateLeave.value = data.activeDate ? new Date(data.activeDate) : null;
|
||||
reason.value = data.reason ?? "";
|
||||
location.value = data.location ?? "";
|
||||
status.value = data.status ?? "";
|
||||
remarkHorizontal.value = data.remarkHorizontal ?? "-";
|
||||
isNoDebt.value = data.isNoDebt;
|
||||
isNoBurden.value = data.isNoBurden;
|
||||
isDiscipline.value = data.isDiscipline;
|
||||
}
|
||||
myForm.value?.resetValidation();
|
||||
}
|
||||
|
||||
|
|
@ -293,8 +307,8 @@ onMounted(async () => {
|
|||
class="q-mr-sm"
|
||||
@click="router.push('/retirement/resign-employee')"
|
||||
/>
|
||||
รายละเอียดการยกเลิกลาออกของ{{
|
||||
dataDetail.firstName + " " + dataDetail.lastName
|
||||
รายละเอียดการยกเลิกลาออก {{
|
||||
dataDetail.prefix.dataDetail.firstName + " " + dataDetail.lastName
|
||||
}}
|
||||
</div>
|
||||
|
||||
|
|
@ -719,10 +733,10 @@ onMounted(async () => {
|
|||
dense
|
||||
:borderless="!edit"
|
||||
:model-value="date !== null ? date2Thai(date) : null"
|
||||
:rules="[
|
||||
:rules="edit ? [
|
||||
(val:string) =>
|
||||
!!val || `${'กรุณาเลือก วันที่ยื่นขอลาออกจากราชการ'}`,
|
||||
]"
|
||||
] : []"
|
||||
hide-bottom-space
|
||||
:label="`${' วันที่ยื่นขอลาออกจากราชการ'}`"
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue