fix === > แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย ทุกระบบ
This commit is contained in:
parent
bcd5d1d56c
commit
d9bb320b16
17 changed files with 514 additions and 348 deletions
|
|
@ -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="`${'ตั้งแต่วัน'}`"
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue