fix === > แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย ทุกระบบ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-11-29 14:28:21 +07:00
parent bcd5d1d56c
commit d9bb320b16
17 changed files with 514 additions and 348 deletions

View file

@ -98,7 +98,7 @@ onMounted(() => {
class="q-mr-sm"
@click="router.push(`/retirement/deceased`)"
/>
รายละเอยดบนทกเวยนแจงการถงแกกรรม{{ fullName }}
รายละเอยดบนทกเวยนแจงการถงแกกรรม {{ fullName }}
</div>
<CardProfile :data="dataProfile as DataProfile" />

View file

@ -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"
/>

View file

@ -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="`${'ตั้งแต่วัน'}`"
>

View file

@ -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="`${' วันที่ยื่นขอลาออกจากราชการ'}`"
>

View file

@ -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="`${' วันที่ยื่นขอลาออกจากราชการ'}`"
>

View file

@ -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="`${' วันที่ยื่นขอลาออกจากราชการ'}`"
>

View file

@ -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="`${' วันที่ยื่นขอลาออกจากราชการ'}`"
>