fix bug send profileId to registry
This commit is contained in:
parent
f829dc2098
commit
a646ad3d6d
19 changed files with 205 additions and 1052 deletions
|
|
@ -98,6 +98,7 @@ export default {
|
||||||
receiveReport: `${receive}/report`,
|
receiveReport: `${receive}/report`,
|
||||||
receiveDataId: (id: string) => `${receive}/${id}`,
|
receiveDataId: (id: string) => `${receive}/${id}`,
|
||||||
receivePosition: (id: string) => `${receive}/position/${id}`,
|
receivePosition: (id: string) => `${receive}/position/${id}`,
|
||||||
|
receiveDataPosition: () => `${receive}/use`,
|
||||||
|
|
||||||
//tranfer ระบบคำขอโอน
|
//tranfer ระบบคำขอโอน
|
||||||
transfer,
|
transfer,
|
||||||
|
|
@ -115,6 +116,7 @@ export default {
|
||||||
appointmentDelete: (id: string) => `${placement}/appointment/${id}`,
|
appointmentDelete: (id: string) => `${placement}/appointment/${id}`,
|
||||||
appointmentPosition: (id: string) => `${placement}/appointment/position/${id}`,
|
appointmentPosition: (id: string) => `${placement}/appointment/position/${id}`,
|
||||||
apppointmentReport: (id: string) => `${placement}/appointment/report/${id}`,
|
apppointmentReport: (id: string) => `${placement}/appointment/report/${id}`,
|
||||||
|
apppointmentPosition: () => `${placement}/appointment/use`,
|
||||||
|
|
||||||
// ช่วยราชการ
|
// ช่วยราชการ
|
||||||
placemenHelpGov,
|
placemenHelpGov,
|
||||||
|
|
@ -139,6 +141,8 @@ export default {
|
||||||
relocationMainReport: () => `${placement}/relocation/report`,
|
relocationMainReport: () => `${placement}/relocation/report`,
|
||||||
relocationMainPut: (id: string) => `${placement}/relocation/position/${id}`,
|
relocationMainPut: (id: string) => `${placement}/relocation/position/${id}`,
|
||||||
relocationMainEdit: (id: string) => `${placemenRelocation}/${id}`,
|
relocationMainEdit: (id: string) => `${placemenRelocation}/${id}`,
|
||||||
|
relocationMainPosition: () => `${placement}/relocation/use`,
|
||||||
|
|
||||||
// อื่นๆ
|
// อื่นๆ
|
||||||
placemenOther,
|
placemenOther,
|
||||||
otherMain: () => `${placemenOther}`,
|
otherMain: () => `${placemenOther}`,
|
||||||
|
|
|
||||||
|
|
@ -30,15 +30,12 @@ let dataForm = reactive({
|
||||||
positionLineId: "",
|
positionLineId: "",
|
||||||
positionPathSideId: "",
|
positionPathSideId: "",
|
||||||
positionTypeId: "",
|
positionTypeId: "",
|
||||||
// salaryAmount: null,
|
|
||||||
// mouthSalaryAmount: null,
|
|
||||||
// positionSalaryAmount: null,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fetchPublishFile();
|
await fetchPublishFile();
|
||||||
await loadTreeData();
|
await loadTreeData();
|
||||||
// await fetchplacementPosition();
|
await fetchplacementPosition();
|
||||||
});
|
});
|
||||||
const fetchPublishFile = async () => {
|
const fetchPublishFile = async () => {
|
||||||
await http
|
await http
|
||||||
|
|
@ -90,17 +87,17 @@ function filterByPersonIdNull(obj: any) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// โหลด position
|
// โหลด position
|
||||||
// const placementPosition = ref<any>([]);
|
const placementPosition = ref<any>([]);
|
||||||
// const fetchplacementPosition = async () => {
|
const fetchplacementPosition = async () => {
|
||||||
// await http
|
await http
|
||||||
// .get(config.API.placementPosition())
|
.get(config.API.apppointmentPosition())
|
||||||
// .then((res: any) => {
|
.then((res: any) => {
|
||||||
// placementPosition.value = res.data.result;
|
placementPosition.value = res.data.result;
|
||||||
// })
|
})
|
||||||
// .catch((e: any) => {
|
.catch((e: any) => {
|
||||||
// messageError($q, e);
|
messageError($q, e);
|
||||||
// });
|
});
|
||||||
// };
|
};
|
||||||
|
|
||||||
const search = ref<string>("");
|
const search = ref<string>("");
|
||||||
//reset Tree Filter
|
//reset Tree Filter
|
||||||
|
|
@ -191,7 +188,7 @@ const saveAppoint = async () => {
|
||||||
// await resetFilter();
|
// await resetFilter();
|
||||||
await fetchPublishFile();
|
await fetchPublishFile();
|
||||||
await loadTreeData();
|
await loadTreeData();
|
||||||
// await fetchplacementPosition();
|
await fetchplacementPosition();
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -367,10 +364,10 @@ const selectedPosition = async (data: any) => {
|
||||||
console.log("dataForm", dataForm);
|
console.log("dataForm", dataForm);
|
||||||
};
|
};
|
||||||
|
|
||||||
// const checkPosition = (val: string) => {
|
const checkPosition = (val: string) => {
|
||||||
// const num = placementPosition.value.findIndex((e: string) => e === val);
|
const num = placementPosition.value.findIndex((e: string) => e === val);
|
||||||
// return num;
|
return num;
|
||||||
// };
|
};
|
||||||
const personal = ref<any>();
|
const personal = ref<any>();
|
||||||
const expanded = ref<string[]>([]);
|
const expanded = ref<string[]>([]);
|
||||||
|
|
||||||
|
|
@ -506,13 +503,12 @@ function findByPerson(element: any): any {
|
||||||
:active="selected == prop.node.keyId"
|
:active="selected == prop.node.keyId"
|
||||||
@click="selectedPosition(prop.node)"
|
@click="selectedPosition(prop.node)"
|
||||||
:disable="
|
:disable="
|
||||||
prop.node.name != null
|
prop.node.name != null ||
|
||||||
|
checkPosition(prop.node.positionNumId) != -1
|
||||||
"
|
"
|
||||||
active-class="my-list-link text-primary text-weight-medium"
|
active-class="my-list-link text-primary text-weight-medium"
|
||||||
class="row items-center text-dark q-py-xs q-pl-sm rounded-borders my-list"
|
class="row items-center text-dark q-py-xs q-pl-sm rounded-borders my-list"
|
||||||
>
|
>
|
||||||
<!-- checkPosition(prop.node.positionNumId) != -1 -->
|
|
||||||
<img
|
<img
|
||||||
v-if="
|
v-if="
|
||||||
prop.node.avatar == '' ||
|
prop.node.avatar == '' ||
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ const title = ref<ResponseTitle>({
|
||||||
const appointment = ref<any>([]);
|
const appointment = ref<any>([]);
|
||||||
|
|
||||||
const edit = ref<boolean>(false);
|
const edit = ref<boolean>(false);
|
||||||
|
const profileId = ref<string>("");
|
||||||
const organizationPositionOld = ref<string>("");
|
const organizationPositionOld = ref<string>("");
|
||||||
const positionTypeOld = ref<string>("");
|
const positionTypeOld = ref<string>("");
|
||||||
const positionLevelOld = ref<string>("");
|
const positionLevelOld = ref<string>("");
|
||||||
|
|
@ -53,8 +54,9 @@ const fecthappointmentByid = async () => {
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
appointment.value = data;
|
appointment.value = data;
|
||||||
console.log(data);
|
// console.log(data);
|
||||||
|
|
||||||
|
profileId.value = data.profileId;
|
||||||
title.value.fullname = `${data.firstname ?? "-"} ${data.lastname ?? "-"}`;
|
title.value.fullname = `${data.firstname ?? "-"} ${data.lastname ?? "-"}`;
|
||||||
title.value.organizationPositionOld = data.organizationPositionOld ?? "-";
|
title.value.organizationPositionOld = data.organizationPositionOld ?? "-";
|
||||||
title.value.positionLevelOld = data.positionLevelOld ?? "-";
|
title.value.positionLevelOld = data.positionLevelOld ?? "-";
|
||||||
|
|
@ -131,16 +133,7 @@ const getClass = (val: boolean) => {
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
<q-btn
|
<q-btn icon="mdi-arrow-left" unelevated round dense flat color="primary" class="q-mr-sm" @click="router.go(-1)" />
|
||||||
icon="mdi-arrow-left"
|
|
||||||
unelevated
|
|
||||||
round
|
|
||||||
dense
|
|
||||||
flat
|
|
||||||
color="primary"
|
|
||||||
class="q-mr-sm"
|
|
||||||
@click="router.go(-1)"
|
|
||||||
/>
|
|
||||||
รายละเอียดการแต่งตั้ง-เลื่อน {{ title.fullname }}
|
รายละเอียดการแต่งตั้ง-เลื่อน {{ title.fullname }}
|
||||||
</div>
|
</div>
|
||||||
<q-card bordered class="row col-12 text-dark">
|
<q-card bordered class="row col-12 text-dark">
|
||||||
|
|
@ -149,15 +142,8 @@ const getClass = (val: boolean) => {
|
||||||
{{ title.fullname }}
|
{{ title.fullname }}
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-btn
|
<q-btn outline color="blue" dense icon-right="mdi-open-in-new" class="q-px-sm" label="ดูข้อมูลทะเบียนประวัติ"
|
||||||
outline
|
@click="router.push(`/registry/${profileId}`)" />
|
||||||
color="blue"
|
|
||||||
dense
|
|
||||||
icon-right="mdi-open-in-new"
|
|
||||||
class="q-px-sm"
|
|
||||||
label="ดูข้อมูลทะเบียนประวัติ"
|
|
||||||
@click="router.push(`/registry/${paramsId}`)"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div class="row col-12 q-pa-md">
|
<div class="row col-12 q-pa-md">
|
||||||
|
|
@ -204,36 +190,12 @@ const getClass = (val: boolean) => {
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="q-gutter-sm" v-if="!edit">
|
<div class="q-gutter-sm" v-if="!edit">
|
||||||
<q-btn
|
<q-btn outline color="primary" dense icon-right="mdi-file-edit-outline" class="q-px-sm" label="แก้ไข"
|
||||||
outline
|
style="width: 80px" @click="edit = !edit" />
|
||||||
color="primary"
|
|
||||||
dense
|
|
||||||
icon-right="mdi-file-edit-outline"
|
|
||||||
class="q-px-sm"
|
|
||||||
label="แก้ไข"
|
|
||||||
style="width: 80px"
|
|
||||||
@click="edit = !edit"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="q-gutter-sm" v-else>
|
<div class="q-gutter-sm" v-else>
|
||||||
<q-btn
|
<q-btn outline color="public" dense class="q-px-sm" label="บันทึก" style="width: 80px" @click="clickSave" />
|
||||||
outline
|
<q-btn outline color="red" dense class="q-px-sm" label="ยกเลิก" style="width: 80px" @click="edit = !edit" />
|
||||||
color="public"
|
|
||||||
dense
|
|
||||||
class="q-px-sm"
|
|
||||||
label="บันทึก"
|
|
||||||
style="width: 80px"
|
|
||||||
@click="clickSave"
|
|
||||||
/>
|
|
||||||
<q-btn
|
|
||||||
outline
|
|
||||||
color="red"
|
|
||||||
dense
|
|
||||||
class="q-px-sm"
|
|
||||||
label="ยกเลิก"
|
|
||||||
style="width: 80px"
|
|
||||||
@click="edit = !edit"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
|
|
@ -243,19 +205,9 @@ const getClass = (val: boolean) => {
|
||||||
<div class="text-weight-bold text-grey">วุฒิการศึกษา</div>
|
<div class="text-weight-bold text-grey">วุฒิการศึกษา</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
||||||
:class="getClass(edit)"
|
v-model="educationOld" :rules="[(val) => !!val || `${'กรุณากรอกวุฒิการศึกษา'}`]" hide-bottom-space
|
||||||
:outlined="edit"
|
:label="`${'วุฒิการศึกษา'}`" type="text" />
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="educationOld"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกวุฒิการศึกษา'}`]"
|
|
||||||
hide-bottom-space
|
|
||||||
:label="`${'วุฒิการศึกษา'}`"
|
|
||||||
type="text"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row col-12 q-pa-md">
|
<div class="row col-12 q-pa-md">
|
||||||
|
|
@ -268,85 +220,38 @@ const getClass = (val: boolean) => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
||||||
:class="getClass(edit)"
|
v-model="organizationPositionOld" :rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
|
||||||
:outlined="edit"
|
hide-bottom-space :label="`${'ตำแหน่ง/สังกัด'}`" type="textarea" />
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="organizationPositionOld"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
|
|
||||||
hide-bottom-space
|
|
||||||
:label="`${'ตำแหน่ง/สังกัด'}`"
|
|
||||||
type="textarea"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-6 col-sm-3 row items-center">
|
<div class="col-xs-6 col-sm-3 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
||||||
:class="getClass(edit)"
|
v-model="positionTypeOld" :rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]" hide-bottom-space
|
||||||
:outlined="edit"
|
:label="`${'ตำแหน่งประเภท'}`" />
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="positionTypeOld"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
|
|
||||||
hide-bottom-space
|
|
||||||
:label="`${'ตำแหน่งประเภท'}`"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 row items-center">
|
<div class="col-xs-6 col-sm-3 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
||||||
:class="getClass(edit)"
|
v-model="positionLevelOld" :rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]" hide-bottom-space
|
||||||
:outlined="edit"
|
:label="`${'ระดับ'}`" />
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="positionLevelOld"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]"
|
|
||||||
hide-bottom-space
|
|
||||||
:label="`${'ระดับ'}`"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 row items-center">
|
<div class="col-xs-6 col-sm-3 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
||||||
:class="getClass(edit)"
|
v-model="posNo" :rules="[(val) => !!val || `${'กรุณากรอกเลขที่'}`]" hide-bottom-space
|
||||||
:outlined="edit"
|
:label="`${'เลขที่'}`" />
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="posNo"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกเลขที่'}`]"
|
|
||||||
hide-bottom-space
|
|
||||||
:label="`${'เลขที่'}`"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 row items-center">
|
<div class="col-xs-6 col-sm-3 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
||||||
:class="getClass(edit)"
|
v-model="salary" :rules="[(val) => !!val || `${'กรุณากรอกเงินเดือน'}`]" hide-bottom-space
|
||||||
:outlined="edit"
|
:label="`${'เงินเดือน'}`" type="number" />
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="salary"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
|
||||||
hide-bottom-space
|
|
||||||
:label="`${'เงินเดือน'}`"
|
|
||||||
type="number"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
|
|
@ -368,41 +273,22 @@ const getClass = (val: boolean) => {
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="col-xs-6 col-sm-6 row items-center">
|
<div class="col-xs-6 col-sm-6 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<datepicker
|
<datepicker menu-class-name="modalfix" :readonly="!edit" v-model="date" :locale="'th'" autoApply
|
||||||
menu-class-name="modalfix"
|
:enableTimePicker="false" week-start="0">
|
||||||
:readonly="!edit"
|
|
||||||
v-model="date"
|
|
||||||
:locale="'th'"
|
|
||||||
autoApply
|
|
||||||
:enableTimePicker="false"
|
|
||||||
week-start="0"
|
|
||||||
>
|
|
||||||
<template #year="{ year }">{{ year + 543 }}</template>
|
<template #year="{ year }">{{ year + 543 }}</template>
|
||||||
<template #year-overlay-value="{ value }">{{
|
<template #year-overlay-value="{ value }">{{
|
||||||
parseInt(value + 543)
|
parseInt(value + 543)
|
||||||
}}</template>
|
}}</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :borderless="!edit"
|
||||||
:class="getClass(edit)"
|
|
||||||
:outlined="edit"
|
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
:borderless="!edit"
|
|
||||||
:model-value="date !== null ? date2Thai(date) : null"
|
:model-value="date !== null ? date2Thai(date) : null"
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]" hide-bottom-space
|
||||||
hide-bottom-space
|
:label="`${'ดำรงตำแหน่งในระดับปัจจุบันเมื่อ'}`">
|
||||||
:label="`${'ดำรงตำแหน่งในระดับปัจจุบันเมื่อ'}`"
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon name="event" class="cursor-pointer" :style="edit
|
||||||
name="event"
|
? 'color: var(--q-primary)'
|
||||||
class="cursor-pointer"
|
: 'color: var(--q-grey)'
|
||||||
:style="
|
">
|
||||||
edit
|
|
||||||
? 'color: var(--q-primary)'
|
|
||||||
: 'color: var(--q-grey)'
|
|
||||||
"
|
|
||||||
>
|
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
@ -411,19 +297,9 @@ const getClass = (val: boolean) => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
||||||
:class="getClass(edit)"
|
v-model="reason" :rules="[(val) => !!val || `${'กรุณากรอกหมายเหตุ '}`]" hide-bottom-space
|
||||||
:outlined="edit"
|
:label="`${'หมายเหตุ '}`" type="textarea" />
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="reason"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกหมายเหตุ '}`]"
|
|
||||||
hide-bottom-space
|
|
||||||
:label="`${'หมายเหตุ '}`"
|
|
||||||
type="textarea"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -435,11 +311,13 @@ const getClass = (val: boolean) => {
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
height: 70px;
|
height: 70px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-top {
|
.text-top {
|
||||||
color: gray;
|
color: gray;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
padding-bottom: 3px;
|
padding-bottom: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-detail {
|
.text-detail {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
import type { ResponseTitle } from "@/modules/05_placement/interface/response/Receive";
|
import type { ResponseTitle } from "@/modules/05_placement/interface/response/Receive";
|
||||||
import type {
|
import type {
|
||||||
TypeFile,
|
|
||||||
ResponseDataDetail,
|
ResponseDataDetail,
|
||||||
} from "@/modules/05_placement/interface/response/Transfer";
|
} from "@/modules/05_placement/interface/response/Transfer";
|
||||||
import type { QTableProps, QForm } from "quasar";
|
import type { QTableProps, QForm } from "quasar";
|
||||||
|
|
@ -37,6 +36,7 @@ const title = ref<ResponseTitle>({
|
||||||
positionTypeOld: "",
|
positionTypeOld: "",
|
||||||
});
|
});
|
||||||
const responseData = ref<ResponseDataDetail>({
|
const responseData = ref<ResponseDataDetail>({
|
||||||
|
profileId: "",
|
||||||
avataPath: "",
|
avataPath: "",
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
date: new Date(),
|
date: new Date(),
|
||||||
|
|
@ -78,13 +78,14 @@ const fecthOther = async () => {
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
Otherdata.value = res.data.result;
|
Otherdata.value = res.data.result;
|
||||||
console.log(data);
|
// console.log(data);
|
||||||
|
|
||||||
title.value.fullname = `${data.firstname ?? "-"} ${data.lastname ?? "-"}`;
|
title.value.fullname = `${data.firstname ?? "-"} ${data.lastname ?? "-"}`;
|
||||||
title.value.organizationPositionOld = data.organizationPositionOld ?? "-";
|
title.value.organizationPositionOld = data.organizationPositionOld ?? "-";
|
||||||
title.value.positionLevelOld = data.positionLevelOld ?? "-";
|
title.value.positionLevelOld = data.positionLevelOld ?? "-";
|
||||||
title.value.positionTypeOld = data.positionTypeOld ?? "-";
|
title.value.positionTypeOld = data.positionTypeOld ?? "-";
|
||||||
|
|
||||||
|
responseData.value.profileId = data.profileId;
|
||||||
responseData.value.createdAt = data.createdAt;
|
responseData.value.createdAt = data.createdAt;
|
||||||
responseData.value.date =
|
responseData.value.date =
|
||||||
data.date !== null ? new Date(data.date) : new Date();
|
data.date !== null ? new Date(data.date) : new Date();
|
||||||
|
|
@ -189,7 +190,7 @@ const getClass = (val: boolean) => {
|
||||||
icon-right="mdi-open-in-new"
|
icon-right="mdi-open-in-new"
|
||||||
class="q-px-sm"
|
class="q-px-sm"
|
||||||
label="ดูข้อมูลทะเบียนประวัติ"
|
label="ดูข้อมูลทะเบียนประวัติ"
|
||||||
@click="router.push(`/registry/${paramsId}`)"
|
@click="router.push(`/registry/${responseData.profileId}`)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
icon-right="mdi-open-in-new"
|
icon-right="mdi-open-in-new"
|
||||||
class="q-px-sm"
|
class="q-px-sm"
|
||||||
label="ดูข้อมูลทะเบียนประวัติ"
|
label="ดูข้อมูลทะเบียนประวัติ"
|
||||||
@click="router.push(`/registry/${paramsId}`)"
|
@click="router.push(`/registry/${profileId}`)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
|
|
@ -618,14 +618,15 @@ const title = ref<ResponseTitle>({
|
||||||
const myForm = ref<QForm | null>(null);
|
const myForm = ref<QForm | null>(null);
|
||||||
const edit = ref<boolean>(false);
|
const edit = ref<boolean>(false);
|
||||||
|
|
||||||
|
const profileId = ref<string>("");
|
||||||
const educationOld = ref<string>("");
|
const educationOld = ref<string>("");
|
||||||
const organizationPositionOld = ref<string>("");
|
const organizationPositionOld = ref<string>("");
|
||||||
const positionTypeOld = ref<string>("");
|
const positionTypeOld = ref<string>("");
|
||||||
const positionLevelOld = ref<string>("");
|
const positionLevelOld = ref<string>("");
|
||||||
const posNo = ref<string>("");
|
const posNo = ref<string>("");
|
||||||
const salary = ref<number>(0);
|
const salary = ref<number>(0);
|
||||||
const organization = ref<string>("");
|
// const organization = ref<string>("");
|
||||||
const date = ref<Date | null>(null);
|
// const date = ref<Date | null>(null);
|
||||||
const reason = ref<string>("");
|
const reason = ref<string>("");
|
||||||
|
|
||||||
const informaData = ref<Information>(defaultInformation);
|
const informaData = ref<Information>(defaultInformation);
|
||||||
|
|
@ -738,6 +739,7 @@ const getData = async () => {
|
||||||
.then(async (res: any) => {
|
.then(async (res: any) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
||||||
|
profileId.value = data.profileId;
|
||||||
title.value.fullname = `${data.firstname ?? "-"} ${data.lastname ?? "-"}`;
|
title.value.fullname = `${data.firstname ?? "-"} ${data.lastname ?? "-"}`;
|
||||||
title.value.organizationPositionOld = data.organizationPositionOld ?? "-";
|
title.value.organizationPositionOld = data.organizationPositionOld ?? "-";
|
||||||
title.value.positionLevelOld = data.positionLevelOld ?? "-";
|
title.value.positionLevelOld = data.positionLevelOld ?? "-";
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ function filterByPersonIdNull(obj: any) {
|
||||||
const placementPosition = ref<any>([]);
|
const placementPosition = ref<any>([]);
|
||||||
const fetchplacementPosition = async () => {
|
const fetchplacementPosition = async () => {
|
||||||
await http
|
await http
|
||||||
.get(config.API.placementPosition())
|
.get(config.API.receiveDataPosition())
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
placementPosition.value = res.data.result;
|
placementPosition.value = res.data.result;
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ function filterByPersonIdNull(obj: any) {
|
||||||
const placementPosition = ref<any>([]);
|
const placementPosition = ref<any>([]);
|
||||||
const fetchplacementPosition = async () => {
|
const fetchplacementPosition = async () => {
|
||||||
await http
|
await http
|
||||||
.get(config.API.placementPosition())
|
.get(config.API.relocationMainPosition())
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
placementPosition.value = res.data.result;
|
placementPosition.value = res.data.result;
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const edit = ref<boolean>(false);
|
const edit = ref<boolean>(false);
|
||||||
const personId = route.params.id as string;
|
const dataId = route.params.id as string;
|
||||||
const {
|
const {
|
||||||
date2Thai,
|
date2Thai,
|
||||||
dialogMessage,
|
dialogMessage,
|
||||||
|
|
@ -36,7 +36,7 @@ const name = ref<string>("นายสมคิด ยอดใจ");
|
||||||
const level = ref<string>("ชำนาญการพิเศษ");
|
const level = ref<string>("ชำนาญการพิเศษ");
|
||||||
const institution = ref<string>("ฝ่ายบริหารงานทั่วไป");
|
const institution = ref<string>("ฝ่ายบริหารงานทั่วไป");
|
||||||
const fullname = ref<string>("");
|
const fullname = ref<string>("");
|
||||||
const id = ref<string>("");
|
const profileId = ref<string>("");
|
||||||
const prefix = ref<string>("");
|
const prefix = ref<string>("");
|
||||||
const prefixId = ref<string>("");
|
const prefixId = ref<string>("");
|
||||||
const firstname = ref<string>("");
|
const firstname = ref<string>("");
|
||||||
|
|
@ -114,9 +114,10 @@ const isActive = ref<string>("");
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.relocationDetail(personId))
|
.get(config.API.relocationDetail(dataId))
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
profileId.value = data.profileId;
|
||||||
citizenId.value = data.citizenId;
|
citizenId.value = data.citizenId;
|
||||||
fullname.value = `${data.prefix}${data.firstname} ${data.lastname}`;
|
fullname.value = `${data.prefix}${data.firstname} ${data.lastname}`;
|
||||||
prefixId.value = data.prefixId;
|
prefixId.value = data.prefixId;
|
||||||
|
|
@ -205,7 +206,7 @@ const saveData = async () => {
|
||||||
};
|
};
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.relocationMainEdit(personId.toString()), body)
|
.put(config.API.relocationMainEdit(dataId), body)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
// const data = res.data.result;
|
// const data = res.data.result;
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
|
|
@ -221,35 +222,6 @@ const saveData = async () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// const confirmMessage = async () => {
|
|
||||||
// dialogMessage(
|
|
||||||
// $q,
|
|
||||||
// "ต้องการยืนยันส่งคำร้องไปยัง สกจ หรือไม่?",
|
|
||||||
// "ข้อมูลจะถูกนำส่งคำร้องไปยัง สกจ ทันที",
|
|
||||||
// "mdi-help-circle-outline",
|
|
||||||
// "ยืนยัน",
|
|
||||||
// "primary",
|
|
||||||
// () => sendConfirm(),
|
|
||||||
// undefined
|
|
||||||
// );
|
|
||||||
// };
|
|
||||||
// const sendConfirm = async () => {
|
|
||||||
// showLoader();
|
|
||||||
// await http
|
|
||||||
// .get(config.API.transferConfirmId(personId.toString()))
|
|
||||||
// .then((res: any) => {
|
|
||||||
// // const data = res.data.result;
|
|
||||||
// // console.log(data);
|
|
||||||
// success($q, "ส่งคำร้องข้อมูลสำเร็จ");
|
|
||||||
// })
|
|
||||||
// .catch((e) => {
|
|
||||||
// messageError($q, e);
|
|
||||||
// })
|
|
||||||
// .finally(async () => {
|
|
||||||
// await getData();
|
|
||||||
// hideLoader();
|
|
||||||
// });
|
|
||||||
// };
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getData();
|
await getData();
|
||||||
});
|
});
|
||||||
|
|
@ -279,7 +251,7 @@ onMounted(async () => {
|
||||||
icon-right="mdi-open-in-new"
|
icon-right="mdi-open-in-new"
|
||||||
class="q-px-sm"
|
class="q-px-sm"
|
||||||
label="ดูข้อมูลทะเบียนประวัติ"
|
label="ดูข้อมูลทะเบียนประวัติ"
|
||||||
@click="router.push(`/registry/${personId}`)"
|
@click="router.push(`/registry/${profileId}`)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
<q-btn
|
<q-btn icon="mdi-arrow-left" unelevated round dense flat color="primary" class="q-mr-sm" @click="router.go(-1)" />
|
||||||
icon="mdi-arrow-left"
|
|
||||||
unelevated
|
|
||||||
round
|
|
||||||
dense
|
|
||||||
flat
|
|
||||||
color="primary"
|
|
||||||
class="q-mr-sm"
|
|
||||||
@click="router.go(-1)"
|
|
||||||
/>
|
|
||||||
รายละเอียดการส่งตัวกลับ {{ fullname }}
|
รายละเอียดการส่งตัวกลับ {{ fullname }}
|
||||||
</div>
|
</div>
|
||||||
<q-card bordered class="row col-12 text-dark">
|
<q-card bordered class="row col-12 text-dark">
|
||||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||||
<div class="q-pl-sm text-weight-bold text-subtitle2">{{ fullname }}</div>
|
<div class="q-pl-sm text-weight-bold text-subtitle2">{{ fullname }}</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-btn
|
<q-btn outline color="blue" dense icon-right="mdi-open-in-new" class="q-px-sm" label="ดูข้อมูลทะเบียนประวัติ"
|
||||||
outline
|
@click="router.push(`/registry/${personId}`)" />
|
||||||
color="blue"
|
|
||||||
dense
|
|
||||||
icon-right="mdi-open-in-new"
|
|
||||||
class="q-px-sm"
|
|
||||||
label="ดูข้อมูลทะเบียนประวัติ"
|
|
||||||
@click="router.push(`/registry/${personId}`)"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div class="row col-12 q-pa-md">
|
<div class="row col-12 q-pa-md">
|
||||||
|
|
@ -79,24 +63,8 @@
|
||||||
/> -->
|
/> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="q-gutter-sm" v-else>
|
<div class="q-gutter-sm" v-else>
|
||||||
<q-btn
|
<q-btn outline color="public" dense class="q-px-sm" label="บันทึก" style="width: 80px" @click="conditionSave" />
|
||||||
outline
|
<q-btn outline color="red" dense class="q-px-sm" label="ยกเลิก" style="width: 80px" @click="cancelBtn" />
|
||||||
color="public"
|
|
||||||
dense
|
|
||||||
class="q-px-sm"
|
|
||||||
label="บันทึก"
|
|
||||||
style="width: 80px"
|
|
||||||
@click="conditionSave"
|
|
||||||
/>
|
|
||||||
<q-btn
|
|
||||||
outline
|
|
||||||
color="red"
|
|
||||||
dense
|
|
||||||
class="q-px-sm"
|
|
||||||
label="ยกเลิก"
|
|
||||||
style="width: 80px"
|
|
||||||
@click="cancelBtn"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
|
|
@ -110,140 +78,64 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
||||||
:class="getClass(edit)"
|
v-model="organizationPositionOld" :rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
|
||||||
:outlined="edit"
|
hide-bottom-space :label="`${'ตำแหน่ง/สังกัด'}`" type="textarea" />
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="organizationPositionOld"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
|
|
||||||
hide-bottom-space
|
|
||||||
:label="`${'ตำแหน่ง/สังกัด'}`"
|
|
||||||
type="textarea"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 row items-center">
|
<div class="col-xs-6 col-sm-3 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
||||||
:class="getClass(edit)"
|
v-model="positionTypeOld" :rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]" hide-bottom-space
|
||||||
:outlined="edit"
|
:label="`${'ตำแหน่งประเภท'}`" />
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="positionTypeOld"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
|
|
||||||
hide-bottom-space
|
|
||||||
:label="`${'ตำแหน่งประเภท'}`"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 row items-center">
|
<div class="col-xs-6 col-sm-3 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
||||||
:class="getClass(edit)"
|
v-model="positionLevelOld" :rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]" hide-bottom-space
|
||||||
:outlined="edit"
|
:label="`${'ระดับ'}`" />
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="positionLevelOld"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]"
|
|
||||||
hide-bottom-space
|
|
||||||
:label="`${'ระดับ'}`"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 row items-center">
|
<div class="col-xs-6 col-sm-3 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
||||||
:class="getClass(edit)"
|
v-model="posNo" :rules="[(val) => !!val || `${'กรุณากรอกเลขที่'}`]" hide-bottom-space
|
||||||
:outlined="edit"
|
:label="`${'เลขที่'}`" />
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="posNo"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกเลขที่'}`]"
|
|
||||||
hide-bottom-space
|
|
||||||
:label="`${'เลขที่'}`"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 row items-center">
|
<div class="col-xs-6 col-sm-3 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
||||||
:class="getClass(edit)"
|
v-model="salary" :rules="[(val) => !!val || `${'กรุณากรอกเงินเดือน'}`]" hide-bottom-space
|
||||||
:outlined="edit"
|
:label="`${'เงินเดือน'}`" type="number" />
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="salary"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
|
||||||
hide-bottom-space
|
|
||||||
:label="`${'เงินเดือน'}`"
|
|
||||||
type="number"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></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-6 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
||||||
:class="getClass(edit)"
|
v-model="organization" :rules="[(val) => !!val || `${'กรุณากรอกโอนไปสังกัด'}`]" hide-bottom-space
|
||||||
:outlined="edit"
|
:label="`${'โอนไปสังกัด'}`" />
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="organization"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกโอนไปสังกัด'}`]"
|
|
||||||
hide-bottom-space
|
|
||||||
:label="`${'โอนไปสังกัด'}`"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 row items-center">
|
<div class="col-xs-6 col-sm-6 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<datepicker
|
<datepicker menu-class-name="modalfix" :readonly="!edit" v-model="date" :locale="'th'" autoApply
|
||||||
menu-class-name="modalfix"
|
:enableTimePicker="false" week-start="0">
|
||||||
:readonly="!edit"
|
|
||||||
v-model="date"
|
|
||||||
:locale="'th'"
|
|
||||||
autoApply
|
|
||||||
:enableTimePicker="false"
|
|
||||||
week-start="0"
|
|
||||||
>
|
|
||||||
<template #year="{ year }">{{ year + 543 }}</template>
|
<template #year="{ year }">{{ year + 543 }}</template>
|
||||||
<template #year-overlay-value="{ value }">{{
|
<template #year-overlay-value="{ value }">{{
|
||||||
parseInt(value + 543)
|
parseInt(value + 543)
|
||||||
}}</template>
|
}}</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :borderless="!edit"
|
||||||
:class="getClass(edit)"
|
|
||||||
:outlined="edit"
|
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
:borderless="!edit"
|
|
||||||
:model-value="date !== null ? date2Thai(date) : null"
|
:model-value="date !== null ? date2Thai(date) : null"
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]" hide-bottom-space :label="`${'ตั้งแต่วัน'}`">
|
||||||
hide-bottom-space
|
|
||||||
:label="`${'ตั้งแต่วัน'}`"
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon name="event" class="cursor-pointer" :style="edit
|
||||||
name="event"
|
? 'color: var(--q-primary)'
|
||||||
class="cursor-pointer"
|
: 'color: var(--q-grey)'
|
||||||
:style="
|
">
|
||||||
edit
|
|
||||||
? 'color: var(--q-primary)'
|
|
||||||
: 'color: var(--q-grey)'
|
|
||||||
"
|
|
||||||
>
|
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
@ -252,19 +144,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
||||||
:class="getClass(edit)"
|
v-model="reason" :rules="[(val) => !!val || `${'กรุณากรอกหมายเหตุ '}`]" hide-bottom-space
|
||||||
:outlined="edit"
|
:label="`${'หมายเหตุ '}`" type="textarea" />
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="reason"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกหมายเหตุ '}`]"
|
|
||||||
hide-bottom-space
|
|
||||||
:label="`${'หมายเหตุ '}`"
|
|
||||||
type="textarea"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -282,17 +164,13 @@ import config from "@/app.config";
|
||||||
import keycloak from "@/plugins/keycloak";
|
import keycloak from "@/plugins/keycloak";
|
||||||
|
|
||||||
import type { QTableProps, QForm } from "quasar";
|
import type { QTableProps, QForm } from "quasar";
|
||||||
// import type {
|
|
||||||
// TypeFile,
|
|
||||||
// ResponseDataDetail,
|
|
||||||
// } from "@/modules/05_placement/interface/response/Transfer";
|
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const edit = ref<boolean>(false);
|
const edit = ref<boolean>(false);
|
||||||
const personId = route.params.id as string;
|
const dataId = route.params.id as string;
|
||||||
const {
|
const {
|
||||||
date2Thai,
|
date2Thai,
|
||||||
dialogMessage,
|
dialogMessage,
|
||||||
|
|
@ -303,11 +181,9 @@ const {
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
const roleAdmin = ref<boolean>(false);
|
|
||||||
const myForm = ref<QForm | null>(null);
|
const myForm = ref<QForm | null>(null);
|
||||||
const name = ref<string>("นายสมคิด ยอดใจ");
|
|
||||||
const level = ref<string>("ชำนาญการพิเศษ");
|
const personId = ref<string>("");
|
||||||
const institution = ref<string>("ฝ่ายบริหารงานทั่วไป");
|
|
||||||
const fullname = ref<string>("");
|
const fullname = ref<string>("");
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
const prefix = ref<string>("");
|
const prefix = ref<string>("");
|
||||||
|
|
@ -327,59 +203,16 @@ const positionLevelOld = ref<string>("");
|
||||||
const positionNumberOld = ref<string>("");
|
const positionNumberOld = ref<string>("");
|
||||||
const organizationPositionOld = ref<string>("");
|
const organizationPositionOld = ref<string>("");
|
||||||
const isActive = ref<string>("");
|
const isActive = ref<string>("");
|
||||||
// const responseData = ref<ResponseDataDetail>({
|
|
||||||
// createdAt: new Date(),
|
|
||||||
// date: new Date(),
|
|
||||||
// id: "",
|
|
||||||
// organization: "",
|
|
||||||
// organizationPositionOld: "",
|
|
||||||
// positionLevelOld: "",
|
|
||||||
// positionNumberOld: "",
|
|
||||||
// positionTypeOld: "",
|
|
||||||
// reason: "",
|
|
||||||
// salary: 0,
|
|
||||||
// status: "",
|
|
||||||
// });
|
|
||||||
|
|
||||||
// const rows = ref<TypeFile[]>([]);
|
|
||||||
// const columns = ref<QTableProps["columns"]>([
|
|
||||||
// {
|
|
||||||
// name: "no",
|
|
||||||
// align: "left",
|
|
||||||
// label: "ลำดับ",
|
|
||||||
// sortable: true,
|
|
||||||
// field: "no",
|
|
||||||
// headerStyle: "font-size: 14px",
|
|
||||||
// style: "font-size: 14px",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: "fileName",
|
|
||||||
// align: "left",
|
|
||||||
// label: "ชื่อไฟล์",
|
|
||||||
// sortable: true,
|
|
||||||
// field: "fileName",
|
|
||||||
// headerStyle: "font-size: 14px",
|
|
||||||
// style: "font-size: 14px",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: "btnMicrosoft",
|
|
||||||
// align: "right",
|
|
||||||
// label: "ปุ่ม",
|
|
||||||
// sortable: true,
|
|
||||||
// field: "btnMicrosoft",
|
|
||||||
// headerStyle: "font-size: 14px",
|
|
||||||
// style: "font-size: 14px",
|
|
||||||
// },
|
|
||||||
// ]);
|
|
||||||
|
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.repatriationDetail(personId))
|
.get(config.API.repatriationDetail(dataId))
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
(fullname.value = `${data.prefix}${data.firstName} ${data.lastName}`),
|
(fullname.value = `${data.prefix}${data.firstName} ${data.lastName}`),
|
||||||
(id.value = data.id);
|
(id.value = data.id);
|
||||||
|
personId.value = data.profileId;
|
||||||
prefix.value = data.prefix;
|
prefix.value = data.prefix;
|
||||||
firstName.value = data.firstName;
|
firstName.value = data.firstName;
|
||||||
lastName.value = data.lastName;
|
lastName.value = data.lastName;
|
||||||
|
|
@ -399,19 +232,20 @@ const getData = async () => {
|
||||||
isActive.value = data.isActive;
|
isActive.value = data.isActive;
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
// messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const getClass = (val: boolean) => {
|
const getClass = (val: boolean) => {
|
||||||
return {
|
return {
|
||||||
"full-width inputgreen cursor-pointer": val,
|
"full-width inputgreen cursor-pointer": val,
|
||||||
"full-width cursor-pointer": !val,
|
"full-width cursor-pointer": !val,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
//
|
|
||||||
const conditionSave = async () => {
|
const conditionSave = async () => {
|
||||||
if (myForm.value !== null) {
|
if (myForm.value !== null) {
|
||||||
myForm.value.validate().then((success: any) => {
|
myForm.value.validate().then((success: any) => {
|
||||||
|
|
@ -443,7 +277,7 @@ const saveData = async () => {
|
||||||
};
|
};
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.repatriationMainEdit(personId.toString()), body)
|
.put(config.API.repatriationMainEdit(dataId), body)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
// const data = res.data.result;
|
// const data = res.data.result;
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
|
|
@ -459,35 +293,6 @@ const saveData = async () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// const confirmMessage = async () => {
|
|
||||||
// dialogMessage(
|
|
||||||
// $q,
|
|
||||||
// "ต้องการยืนยันส่งคำร้องไปยัง สกจ หรือไม่?",
|
|
||||||
// "ข้อมูลจะถูกนำส่งคำร้องไปยัง สกจ ทันที",
|
|
||||||
// "mdi-help-circle-outline",
|
|
||||||
// "ยืนยัน",
|
|
||||||
// "primary",
|
|
||||||
// () => sendConfirm(),
|
|
||||||
// undefined
|
|
||||||
// );
|
|
||||||
// };
|
|
||||||
// const sendConfirm = async () => {
|
|
||||||
// showLoader();
|
|
||||||
// await http
|
|
||||||
// .get(config.API.transferConfirmId(personId.toString()))
|
|
||||||
// .then((res: any) => {
|
|
||||||
// // const data = res.data.result;
|
|
||||||
// // console.log(data);
|
|
||||||
// success($q, "ส่งคำร้องข้อมูลสำเร็จ");
|
|
||||||
// })
|
|
||||||
// .catch((e) => {
|
|
||||||
// messageError($q, e);
|
|
||||||
// })
|
|
||||||
// .finally(async () => {
|
|
||||||
// await getData();
|
|
||||||
// hideLoader();
|
|
||||||
// });
|
|
||||||
// };
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getData();
|
await getData();
|
||||||
});
|
});
|
||||||
|
|
@ -497,11 +302,13 @@ onMounted(async () => {
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
height: 70px;
|
height: 70px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-top {
|
.text-top {
|
||||||
color: gray;
|
color: gray;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
padding-bottom: 3px;
|
padding-bottom: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-detail {
|
.text-detail {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
icon-right="mdi-open-in-new"
|
icon-right="mdi-open-in-new"
|
||||||
class="q-px-sm"
|
class="q-px-sm"
|
||||||
label="ดูข้อมูลทะเบียนประวัติ"
|
label="ดูข้อมูลทะเบียนประวัติ"
|
||||||
@click="router.push(`/registry/${personId}`)"
|
@click="router.push(`/registry/${responseData.profileId}`)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
|
|
@ -380,7 +380,7 @@ const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
||||||
const personId = route.params.id;
|
const dataId = route.params.id;
|
||||||
const {
|
const {
|
||||||
date2Thai,
|
date2Thai,
|
||||||
dialogMessage,
|
dialogMessage,
|
||||||
|
|
@ -405,6 +405,7 @@ const date = ref<Date | null>(null);
|
||||||
const reason = ref<string>("");
|
const reason = ref<string>("");
|
||||||
|
|
||||||
const responseData = ref<ResponseDataDetail>({
|
const responseData = ref<ResponseDataDetail>({
|
||||||
|
profileId: "",
|
||||||
avataPath: "",
|
avataPath: "",
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
date: new Date(),
|
date: new Date(),
|
||||||
|
|
@ -462,7 +463,7 @@ onMounted(async () => {
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.transferId(personId.toString()))
|
.get(config.API.transferId(dataId.toString()))
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
|
|
@ -476,6 +477,7 @@ const getData = async () => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
rows.value = list;
|
rows.value = list;
|
||||||
|
responseData.value.profileId = data.profileId;
|
||||||
responseData.value.createdAt = data.createdAt;
|
responseData.value.createdAt = data.createdAt;
|
||||||
responseData.value.date =
|
responseData.value.date =
|
||||||
data.date !== null ? new Date(data.date) : new Date();
|
data.date !== null ? new Date(data.date) : new Date();
|
||||||
|
|
@ -523,7 +525,7 @@ const confirmMessage = async () => {
|
||||||
const sendConfirm = async () => {
|
const sendConfirm = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.transferConfirmId(personId.toString()))
|
.get(config.API.transferConfirmId(dataId.toString()))
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
// const data = res.data.result;
|
// const data = res.data.result;
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
|
|
@ -566,7 +568,7 @@ const saveData = async () => {
|
||||||
};
|
};
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.transferId(personId.toString()), body)
|
.put(config.API.transferId(dataId.toString()), body)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
// const data = res.data.result;
|
// const data = res.data.result;
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
<q-btn
|
<q-btn icon="mdi-arrow-left" unelevated round dense flat color="primary" class="q-mr-sm" @click="router.go(-1)" />
|
||||||
icon="mdi-arrow-left"
|
|
||||||
unelevated
|
|
||||||
round
|
|
||||||
dense
|
|
||||||
flat
|
|
||||||
color="primary"
|
|
||||||
class="q-mr-sm"
|
|
||||||
@click="router.go(-1)"
|
|
||||||
/>
|
|
||||||
รายละเอียดการช่วยราชการ {{ fullname }}
|
รายละเอียดการช่วยราชการ {{ fullname }}
|
||||||
</div>
|
</div>
|
||||||
<q-card bordered class="row col-12 text-dark">
|
<q-card bordered class="row col-12 text-dark">
|
||||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||||
<div class="q-pl-sm text-weight-bold text-subtitle2">{{ fullname }}</div>
|
<div class="q-pl-sm text-weight-bold text-subtitle2">{{ fullname }}</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-btn
|
<q-btn outline color="blue" dense icon-right="mdi-open-in-new" class="q-px-sm" label="ดูข้อมูลทะเบียนประวัติ"
|
||||||
outline
|
@click="router.push(`/registry/${profileId}`)" />
|
||||||
color="blue"
|
|
||||||
dense
|
|
||||||
icon-right="mdi-open-in-new"
|
|
||||||
class="q-px-sm"
|
|
||||||
label="ดูข้อมูลทะเบียนประวัติ"
|
|
||||||
@click="router.push(`/registry/${personId}`)"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div class="row col-12 q-pa-md">
|
<div class="row col-12 q-pa-md">
|
||||||
|
|
@ -67,36 +51,12 @@
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="q-gutter-sm" v-if="!edit">
|
<div class="q-gutter-sm" v-if="!edit">
|
||||||
<q-btn
|
<q-btn outline color="primary" dense icon-right="mdi-file-edit-outline" class="q-px-sm" label="แก้ไข"
|
||||||
outline
|
style="width: 80px" @click="edit = !edit" />
|
||||||
color="primary"
|
|
||||||
dense
|
|
||||||
icon-right="mdi-file-edit-outline"
|
|
||||||
class="q-px-sm"
|
|
||||||
label="แก้ไข"
|
|
||||||
style="width: 80px"
|
|
||||||
@click="edit = !edit"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="q-gutter-sm" v-else>
|
<div class="q-gutter-sm" v-else>
|
||||||
<q-btn
|
<q-btn outline color="public" dense class="q-px-sm" label="บันทึก" style="width: 80px" @click="conditionSave" />
|
||||||
outline
|
<q-btn outline color="red" dense class="q-px-sm" label="ยกเลิก" style="width: 80px" @click="cancelBtn" />
|
||||||
color="public"
|
|
||||||
dense
|
|
||||||
class="q-px-sm"
|
|
||||||
label="บันทึก"
|
|
||||||
style="width: 80px"
|
|
||||||
@click="conditionSave"
|
|
||||||
/>
|
|
||||||
<q-btn
|
|
||||||
outline
|
|
||||||
color="red"
|
|
||||||
dense
|
|
||||||
class="q-px-sm"
|
|
||||||
label="ยกเลิก"
|
|
||||||
style="width: 80px"
|
|
||||||
@click="cancelBtn"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
|
|
@ -110,19 +70,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
||||||
:class="getClass(edit)"
|
v-model="organizationPositionOld" :rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
|
||||||
:outlined="edit"
|
hide-bottom-space :label="`${'ตำแหน่ง'}`" type="textarea" />
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="organizationPositionOld"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
|
|
||||||
hide-bottom-space
|
|
||||||
:label="`${'ตำแหน่ง'}`"
|
|
||||||
type="textarea"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="col-xs-6 col-sm-3 row items-center">
|
<!-- <div class="col-xs-6 col-sm-3 row items-center">
|
||||||
|
|
@ -193,58 +143,28 @@
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div class="col-xs-6 col-sm-4 row items-center">
|
<div class="col-xs-6 col-sm-4 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
||||||
:class="getClass(edit)"
|
v-model="organization" :rules="[(val) => !!val || `${'กรุณากรอกโอนไปสังกัด'}`]" hide-bottom-space
|
||||||
:outlined="edit"
|
:label="`${'หน่วยงานที่ให้ช่วยราชการ'}`" />
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="organization"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกโอนไปสังกัด'}`]"
|
|
||||||
hide-bottom-space
|
|
||||||
:label="`${'หน่วยงานที่ให้ช่วยราชการ'}`"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-4 row items-center">
|
<div class="col-xs-6 col-sm-4 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<datepicker
|
<datepicker menu-class-name="modalfix" :readonly="!edit" v-model="dateStart" :locale="'th'" autoApply
|
||||||
menu-class-name="modalfix"
|
:enableTimePicker="false" week-start="0">
|
||||||
:readonly="!edit"
|
|
||||||
v-model="dateStart"
|
|
||||||
:locale="'th'"
|
|
||||||
autoApply
|
|
||||||
:enableTimePicker="false"
|
|
||||||
week-start="0"
|
|
||||||
>
|
|
||||||
<template #year="{ year }">{{ year + 543 }}</template>
|
<template #year="{ year }">{{ year + 543 }}</template>
|
||||||
<template #year-overlay-value="{ value }">{{
|
<template #year-overlay-value="{ value }">{{
|
||||||
parseInt(value + 543)
|
parseInt(value + 543)
|
||||||
}}</template>
|
}}</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input :class="getClass(edit)" :outlined="edit" dense :readonly="!edit" lazy-rules :borderless="!edit"
|
||||||
:class="getClass(edit)"
|
|
||||||
:outlined="edit"
|
|
||||||
dense
|
|
||||||
:readonly="!edit"
|
|
||||||
lazy-rules
|
|
||||||
:borderless="!edit"
|
|
||||||
:model-value="dateStart !== null ? date2Thai(dateStart) : null"
|
:model-value="dateStart !== null ? date2Thai(dateStart) : null"
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]" hide-bottom-space :label="`${'ตั้งแต่วัน'}`">
|
||||||
hide-bottom-space
|
|
||||||
:label="`${'ตั้งแต่วัน'}`"
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon name="event" class="cursor-pointer" :style="edit
|
||||||
name="event"
|
? 'color: var(--q-primary)'
|
||||||
class="cursor-pointer"
|
: 'color: var(--q-grey)'
|
||||||
:style="
|
">
|
||||||
edit
|
|
||||||
? 'color: var(--q-primary)'
|
|
||||||
: 'color: var(--q-grey)'
|
|
||||||
"
|
|
||||||
>
|
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
@ -254,42 +174,21 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-4 row items-center">
|
<div class="col-xs-6 col-sm-4 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<datepicker
|
<datepicker menu-class-name="modalfix" :readonly="!edit" v-model="dateEnd" :locale="'th'" autoApply
|
||||||
menu-class-name="modalfix"
|
:enableTimePicker="false" week-start="0">
|
||||||
:readonly="!edit"
|
|
||||||
v-model="dateEnd"
|
|
||||||
:locale="'th'"
|
|
||||||
autoApply
|
|
||||||
:enableTimePicker="false"
|
|
||||||
week-start="0"
|
|
||||||
>
|
|
||||||
<template #year="{ year }">{{ year + 543 }}</template>
|
<template #year="{ year }">{{ year + 543 }}</template>
|
||||||
<template #year-overlay-value="{ value }">{{
|
<template #year-overlay-value="{ value }">{{
|
||||||
parseInt(value + 543)
|
parseInt(value + 543)
|
||||||
}}</template>
|
}}</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input :readonly="!edit" :class="getClass(edit)" :outlined="edit" dense lazy-rules :borderless="!edit"
|
||||||
:readonly="!edit"
|
|
||||||
:class="getClass(edit)"
|
|
||||||
:outlined="edit"
|
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
:borderless="!edit"
|
|
||||||
:model-value="dateEnd !== null ? date2Thai(dateEnd) : null"
|
:model-value="dateEnd !== null ? date2Thai(dateEnd) : null"
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]" hide-bottom-space :label="`${'ถึงวันที่'}`">
|
||||||
hide-bottom-space
|
|
||||||
:label="`${'ถึงวันที่'}`"
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon name="event" class="cursor-pointer" :style="edit
|
||||||
name="event"
|
? 'color: var(--q-primary)'
|
||||||
class="cursor-pointer"
|
: 'color: var(--q-grey)'
|
||||||
:style="
|
">
|
||||||
edit
|
|
||||||
? 'color: var(--q-primary)'
|
|
||||||
: 'color: var(--q-grey)'
|
|
||||||
"
|
|
||||||
>
|
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
@ -298,19 +197,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input :class="getClass(edit)" :outlined="edit" dense lazy-rules :readonly="!edit" :borderless="!edit"
|
||||||
:class="getClass(edit)"
|
v-model="reason" :rules="[(val) => !!val || `${'กรุณากรอกหมายเหตุ '}`]" hide-bottom-space
|
||||||
:outlined="edit"
|
:label="`${'หมายเหตุ '}`" type="textarea" />
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="reason"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกหมายเหตุ '}`]"
|
|
||||||
hide-bottom-space
|
|
||||||
:label="`${'หมายเหตุ '}`"
|
|
||||||
type="textarea"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -338,7 +227,7 @@ const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const edit = ref<boolean>(false);
|
const edit = ref<boolean>(false);
|
||||||
const personId = route.params.id as string;
|
const dataId = route.params.id as string;
|
||||||
const {
|
const {
|
||||||
date2Thai,
|
date2Thai,
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
|
|
@ -355,6 +244,7 @@ const level = ref<string>("ชำนาญการพิเศษ");
|
||||||
const institution = ref<string>("ฝ่ายบริหารงานทั่วไป");
|
const institution = ref<string>("ฝ่ายบริหารงานทั่วไป");
|
||||||
const fullname = ref<string>("");
|
const fullname = ref<string>("");
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
|
const profileId = ref<string>("");
|
||||||
const prefix = ref<string>("");
|
const prefix = ref<string>("");
|
||||||
const firstName = ref<string>("");
|
const firstName = ref<string>("");
|
||||||
const lastName = ref<string>("");
|
const lastName = ref<string>("");
|
||||||
|
|
@ -373,59 +263,16 @@ const positionLevelOld = ref<string>("");
|
||||||
const positionNumberOld = ref<string>("");
|
const positionNumberOld = ref<string>("");
|
||||||
const organizationPositionOld = ref<string>("");
|
const organizationPositionOld = ref<string>("");
|
||||||
const isActive = ref<string>("");
|
const isActive = ref<string>("");
|
||||||
// const responseData = ref<ResponseDataDetail>({
|
|
||||||
// createdAt: new Date(),
|
|
||||||
// date: new Date(),
|
|
||||||
// id: "",
|
|
||||||
// organization: "",
|
|
||||||
// organizationPositionOld: "",
|
|
||||||
// positionLevelOld: "",
|
|
||||||
// positionNumberOld: "",
|
|
||||||
// positionTypeOld: "",
|
|
||||||
// reason: "",
|
|
||||||
// salary: 0,
|
|
||||||
// status: "",
|
|
||||||
// });
|
|
||||||
|
|
||||||
// const rows = ref<TypeFile[]>([]);
|
|
||||||
// const columns = ref<QTableProps["columns"]>([
|
|
||||||
// {
|
|
||||||
// name: "no",
|
|
||||||
// align: "left",
|
|
||||||
// label: "ลำดับ",
|
|
||||||
// sortable: true,
|
|
||||||
// field: "no",
|
|
||||||
// headerStyle: "font-size: 14px",
|
|
||||||
// style: "font-size: 14px",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: "fileName",
|
|
||||||
// align: "left",
|
|
||||||
// label: "ชื่อไฟล์",
|
|
||||||
// sortable: true,
|
|
||||||
// field: "fileName",
|
|
||||||
// headerStyle: "font-size: 14px",
|
|
||||||
// style: "font-size: 14px",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: "btnMicrosoft",
|
|
||||||
// align: "right",
|
|
||||||
// label: "ปุ่ม",
|
|
||||||
// sortable: true,
|
|
||||||
// field: "btnMicrosoft",
|
|
||||||
// headerStyle: "font-size: 14px",
|
|
||||||
// style: "font-size: 14px",
|
|
||||||
// },
|
|
||||||
// ]);
|
|
||||||
|
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.officerDetail(personId))
|
.get(config.API.officerDetail(dataId))
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
(fullname.value = `${data.prefix}${data.firstName} ${data.lastName}`),
|
(fullname.value = `${data.prefix}${data.firstName} ${data.lastName}`),
|
||||||
(id.value = data.id);
|
(id.value = data.id);
|
||||||
|
profileId.value = data.profileId;
|
||||||
prefix.value = data.prefix;
|
prefix.value = data.prefix;
|
||||||
firstName.value = data.firstName;
|
firstName.value = data.firstName;
|
||||||
lastName.value = data.lastName;
|
lastName.value = data.lastName;
|
||||||
|
|
@ -463,13 +310,13 @@ const conditionSave = async () => {
|
||||||
// if (myForm.value !== null) {
|
// if (myForm.value !== null) {
|
||||||
// myForm.value.validate().then((success: any) => {
|
// myForm.value.validate().then((success: any) => {
|
||||||
// if (success) {
|
// if (success) {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => await saveData(),
|
async () => await saveData(),
|
||||||
"ต้องการแก้ไขข้อมูลหรือไม่?",
|
"ต้องการแก้ไขข้อมูลหรือไม่?",
|
||||||
"แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย"
|
"แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
// };
|
// };
|
||||||
|
|
@ -491,7 +338,7 @@ const saveData = async () => {
|
||||||
};
|
};
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.officerMainEdit(personId.toString()), body)
|
.put(config.API.officerMainEdit(dataId), body)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
// const data = res.data.result;
|
// const data = res.data.result;
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
|
|
@ -507,35 +354,6 @@ const saveData = async () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// const confirmMessage = async () => {
|
|
||||||
// dialogMessage(
|
|
||||||
// $q,
|
|
||||||
// "ต้องการยืนยันส่งคำร้องไปยัง สกจ หรือไม่?",
|
|
||||||
// "ข้อมูลจะถูกนำส่งคำร้องไปยัง สกจ ทันที",
|
|
||||||
// "mdi-help-circle-outline",
|
|
||||||
// "ยืนยัน",
|
|
||||||
// "primary",
|
|
||||||
// () => sendConfirm(),
|
|
||||||
// undefined
|
|
||||||
// );
|
|
||||||
// };
|
|
||||||
// const sendConfirm = async () => {
|
|
||||||
// showLoader();
|
|
||||||
// await http
|
|
||||||
// .get(config.API.transferConfirmId(personId.toString()))
|
|
||||||
// .then((res: any) => {
|
|
||||||
// // const data = res.data.result;
|
|
||||||
// // console.log(data);
|
|
||||||
// success($q, "ส่งคำร้องข้อมูลสำเร็จ");
|
|
||||||
// })
|
|
||||||
// .catch((e) => {
|
|
||||||
// messageError($q, e);
|
|
||||||
// })
|
|
||||||
// .finally(async () => {
|
|
||||||
// await getData();
|
|
||||||
// hideLoader();
|
|
||||||
// });
|
|
||||||
// };
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getData();
|
await getData();
|
||||||
});
|
});
|
||||||
|
|
@ -545,11 +363,13 @@ onMounted(async () => {
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
height: 70px;
|
height: 70px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-top {
|
.text-top {
|
||||||
color: gray;
|
color: gray;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
padding-bottom: 3px;
|
padding-bottom: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-detail {
|
.text-detail {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
icon-right="mdi-open-in-new"
|
icon-right="mdi-open-in-new"
|
||||||
class="q-px-sm"
|
class="q-px-sm"
|
||||||
label="ดูข้อมูลทะเบียนประวัติ"
|
label="ดูข้อมูลทะเบียนประวัติ"
|
||||||
|
@click="router.push(`/registry/${personalId}`)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ interface TypeFile {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ResponseDataDetail {
|
interface ResponseDataDetail {
|
||||||
|
profileId: string;
|
||||||
avataPath: string;
|
avataPath: string;
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
date: Date;
|
date: Date;
|
||||||
|
|
|
||||||
|
|
@ -55,8 +55,8 @@ const relocationbyId = () => import("@/modules/05_placement/components/Relocatio
|
||||||
const receiveMain = () =>
|
const receiveMain = () =>
|
||||||
import("@/modules/05_placement/components/Receive/receiveMain.vue");
|
import("@/modules/05_placement/components/Receive/receiveMain.vue");
|
||||||
|
|
||||||
const receiveDetail = () =>
|
// const receiveDetail = () =>
|
||||||
import("@/modules/05_placement/components/Receive/receiveDetail.vue");
|
// import("@/modules/05_placement/components/Receive/receiveDetail.vue");
|
||||||
const receiveDetail2 = () =>
|
const receiveDetail2 = () =>
|
||||||
import("@/modules/05_placement/components/Receive/receiveDetail2.vue");
|
import("@/modules/05_placement/components/Receive/receiveDetail2.vue");
|
||||||
const ReceiveAdd = () =>
|
const ReceiveAdd = () =>
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
icon-right="mdi-open-in-new"
|
icon-right="mdi-open-in-new"
|
||||||
class="q-px-sm"
|
class="q-px-sm"
|
||||||
label="ดูข้อมูลทะเบียนประวัติ"
|
label="ดูข้อมูลทะเบียนประวัติ"
|
||||||
@click="router.push(`/registry/${personId}`)"
|
@click="router.push(`/registry/${responseData.personId}`)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
|
|
@ -66,88 +66,6 @@
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
<!-- <q-card bordered class="row col-12 text-dark q-mt-sm">
|
|
||||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
|
||||||
<div class="q-pl-sm text-weight-bold text-dark">ข้อมูลการปลดออก</div>
|
|
||||||
<q-space />
|
|
||||||
<q-btn
|
|
||||||
v-if="!roleAdmin"
|
|
||||||
outline
|
|
||||||
color="primary"
|
|
||||||
dense
|
|
||||||
icon-right="arrow_forward"
|
|
||||||
class="q-px-sm"
|
|
||||||
label="ส่งคำร้องไปยัง สกจ."
|
|
||||||
@click="confirmMessage"
|
|
||||||
/>
|
|
||||||
<q-btn
|
|
||||||
v-else
|
|
||||||
outline
|
|
||||||
color="primary"
|
|
||||||
dense
|
|
||||||
icon-right="download"
|
|
||||||
class="q-px-sm"
|
|
||||||
label="ดาวน์โหลด"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col-12"><q-separator /></div>
|
|
||||||
<div class="row col-12 q-pa-md">
|
|
||||||
<div class="col-12 row bg-white q-col-gutter-md">
|
|
||||||
<div class="col-xs-6 col-sm-3 row items-center">
|
|
||||||
<div class="col-12">
|
|
||||||
<div class="col-12 text-top">หน่วยงานที่ปลดออกไป</div>
|
|
||||||
<div class="col-12 text-detail">
|
|
||||||
{{ responseData.organization }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-6 col-sm-3 row items-center">
|
|
||||||
<div class="col-12">
|
|
||||||
<div class="col-12 text-top">เหตุผลที่ปลดออก</div>
|
|
||||||
<div class="col-12 text-detail">
|
|
||||||
{{ responseData.reason }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</q-card>
|
|
||||||
|
|
||||||
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
|
||||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
|
||||||
<div class="q-pl-sm text-weight-bold text-dark">เอกสารเพิ่มเติม</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-12"><q-separator /></div>
|
|
||||||
<div class="col-12">
|
|
||||||
<d-table
|
|
||||||
:rows="rows"
|
|
||||||
:columns="columns"
|
|
||||||
row-key="fileName"
|
|
||||||
hide-header
|
|
||||||
hide-bottom
|
|
||||||
>
|
|
||||||
<template v-slot:body="props">
|
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
|
||||||
<q-td key="no" :props="props">
|
|
||||||
{{ props.rowIndex + 1 }}
|
|
||||||
</q-td>
|
|
||||||
<q-td key="fileName" :props="props">
|
|
||||||
{{ props.row.fileName }}
|
|
||||||
</q-td>
|
|
||||||
<q-td key="btnMicrosoft" :props="props">
|
|
||||||
<q-btn flat dense round color="red" icon="picture_as_pdf">
|
|
||||||
<q-tooltip>ไฟล์ PDF</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
<q-btn flat dense round color="blue" icon="mdi-file-word">
|
|
||||||
<q-tooltip>ไฟล์ WORD</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-td>
|
|
||||||
</q-tr>
|
|
||||||
</template>
|
|
||||||
</d-table>
|
|
||||||
</div>
|
|
||||||
</q-card> -->
|
|
||||||
|
|
||||||
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||||
<div class="q-pl-sm text-weight-bold text-dark">
|
<div class="q-pl-sm text-weight-bold text-dark">
|
||||||
|
|
@ -380,7 +298,7 @@ const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
||||||
const personId = route.params.id;
|
const dataId = route.params.id.toString();
|
||||||
const {
|
const {
|
||||||
date2Thai,
|
date2Thai,
|
||||||
dialogMessage,
|
dialogMessage,
|
||||||
|
|
@ -404,6 +322,7 @@ const date = ref<Date | null>(null);
|
||||||
const reason = ref<string>("");
|
const reason = ref<string>("");
|
||||||
|
|
||||||
const responseData = ref<ResponseDataDetail>({
|
const responseData = ref<ResponseDataDetail>({
|
||||||
|
personId: "",
|
||||||
avataPath: "",
|
avataPath: "",
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
date: new Date(),
|
date: new Date(),
|
||||||
|
|
@ -461,10 +380,11 @@ onMounted(async () => {
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.dischargeByid(personId.toString()))
|
.get(config.API.dischargeByid(dataId))
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
||||||
|
responseData.value.personId = data.profileId;
|
||||||
responseData.value.createdAt = data.createdAt;
|
responseData.value.createdAt = data.createdAt;
|
||||||
responseData.value.date =
|
responseData.value.date =
|
||||||
data.date !== null ? new Date(data.date) : new Date();
|
data.date !== null ? new Date(data.date) : new Date();
|
||||||
|
|
@ -500,37 +420,6 @@ const getData = async () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const confirmMessage = async () => {
|
|
||||||
dialogMessage(
|
|
||||||
$q,
|
|
||||||
"ต้องการยืนยันส่งคำร้องไปยัง สกจ หรือไม่?",
|
|
||||||
"ข้อมูลจะถูกนำส่งคำร้องไปยัง สกจ ทันที",
|
|
||||||
"mdi-help-circle-outline",
|
|
||||||
"ยืนยัน",
|
|
||||||
"primary",
|
|
||||||
() => sendConfirm(),
|
|
||||||
undefined
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const sendConfirm = async () => {
|
|
||||||
showLoader();
|
|
||||||
await http;
|
|
||||||
// .get(config.API.transferConfirmId(personId.toString()))
|
|
||||||
// .then((res: any) => {
|
|
||||||
// // const data = res.data.result;
|
|
||||||
// // console.log(data);
|
|
||||||
// success($q, "ส่งคำร้องข้อมูลสำเร็จ");
|
|
||||||
// })
|
|
||||||
// .catch((e) => {
|
|
||||||
// messageError($q, e);
|
|
||||||
// })
|
|
||||||
// .finally(async () => {
|
|
||||||
// await getData();
|
|
||||||
// hideLoader();
|
|
||||||
// });
|
|
||||||
};
|
|
||||||
|
|
||||||
const conditionSave = async () => {
|
const conditionSave = async () => {
|
||||||
if (myForm.value !== null) {
|
if (myForm.value !== null) {
|
||||||
myForm.value.validate().then((success) => {
|
myForm.value.validate().then((success) => {
|
||||||
|
|
@ -563,7 +452,7 @@ const saveData = async () => {
|
||||||
};
|
};
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.dischargeByid(personId.toString()), body)
|
.put(config.API.dischargeByid(dataId), body)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
// const data = res.data.result;
|
// const data = res.data.result;
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
icon-right="mdi-open-in-new"
|
icon-right="mdi-open-in-new"
|
||||||
class="q-px-sm"
|
class="q-px-sm"
|
||||||
label="ดูข้อมูลทะเบียนประวัติ"
|
label="ดูข้อมูลทะเบียนประวัติ"
|
||||||
@click="router.push(`/registry/${personId}`)"
|
@click="router.push(`/registry/${responseData.personId}`)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
|
|
@ -66,88 +66,6 @@
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
<!-- <q-card bordered class="row col-12 text-dark q-mt-sm">
|
|
||||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
|
||||||
<div class="q-pl-sm text-weight-bold text-dark">ข้อมูลการให้ออก</div>
|
|
||||||
<q-space />
|
|
||||||
<q-btn
|
|
||||||
v-if="!roleAdmin"
|
|
||||||
outline
|
|
||||||
color="primary"
|
|
||||||
dense
|
|
||||||
icon-right="arrow_forward"
|
|
||||||
class="q-px-sm"
|
|
||||||
label="ส่งคำร้องไปยัง สกจ."
|
|
||||||
@click="confirmMessage"
|
|
||||||
/>
|
|
||||||
<q-btn
|
|
||||||
v-else
|
|
||||||
outline
|
|
||||||
color="primary"
|
|
||||||
dense
|
|
||||||
icon-right="download"
|
|
||||||
class="q-px-sm"
|
|
||||||
label="ดาวน์โหลด"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col-12"><q-separator /></div>
|
|
||||||
<div class="row col-12 q-pa-md">
|
|
||||||
<div class="col-12 row bg-white q-col-gutter-md">
|
|
||||||
<div class="col-xs-6 col-sm-3 row items-center">
|
|
||||||
<div class="col-12">
|
|
||||||
<div class="col-12 text-top">หน่วยงานที่ให้ออก</div>
|
|
||||||
<div class="col-12 text-detail">
|
|
||||||
{{ responseData.organization }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-6 col-sm-3 row items-center">
|
|
||||||
<div class="col-12">
|
|
||||||
<div class="col-12 text-top">เหตุผลที่ให้ออก</div>
|
|
||||||
<div class="col-12 text-detail">
|
|
||||||
{{ responseData.reason }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</q-card>
|
|
||||||
|
|
||||||
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
|
||||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
|
||||||
<div class="q-pl-sm text-weight-bold text-dark">เอกสารเพิ่มเติม</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-12"><q-separator /></div>
|
|
||||||
<div class="col-12">
|
|
||||||
<d-table
|
|
||||||
:rows="rows"
|
|
||||||
:columns="columns"
|
|
||||||
row-key="fileName"
|
|
||||||
hide-header
|
|
||||||
hide-bottom
|
|
||||||
>
|
|
||||||
<template v-slot:body="props">
|
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
|
||||||
<q-td key="no" :props="props">
|
|
||||||
{{ props.rowIndex + 1 }}
|
|
||||||
</q-td>
|
|
||||||
<q-td key="fileName" :props="props">
|
|
||||||
{{ props.row.fileName }}
|
|
||||||
</q-td>
|
|
||||||
<q-td key="btnMicrosoft" :props="props">
|
|
||||||
<q-btn flat dense round color="red" icon="picture_as_pdf">
|
|
||||||
<q-tooltip>ไฟล์ PDF</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
<q-btn flat dense round color="blue" icon="mdi-file-word">
|
|
||||||
<q-tooltip>ไฟล์ WORD</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-td>
|
|
||||||
</q-tr>
|
|
||||||
</template>
|
|
||||||
</d-table>
|
|
||||||
</div>
|
|
||||||
</q-card> -->
|
|
||||||
|
|
||||||
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||||
<div class="q-pl-sm text-weight-bold text-dark">
|
<div class="q-pl-sm text-weight-bold text-dark">
|
||||||
|
|
@ -380,7 +298,7 @@ const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
||||||
const personId = route.params.id;
|
const dataId = route.params.id.toString();
|
||||||
const {
|
const {
|
||||||
date2Thai,
|
date2Thai,
|
||||||
dialogMessage,
|
dialogMessage,
|
||||||
|
|
@ -404,6 +322,7 @@ const date = ref<Date | null>(null);
|
||||||
const reason = ref<string>("");
|
const reason = ref<string>("");
|
||||||
|
|
||||||
const responseData = ref<ResponseDataDetail>({
|
const responseData = ref<ResponseDataDetail>({
|
||||||
|
personId: "",
|
||||||
avataPath: "",
|
avataPath: "",
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
date: new Date(),
|
date: new Date(),
|
||||||
|
|
@ -461,10 +380,11 @@ onMounted(async () => {
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.outByid(personId.toString()))
|
.get(config.API.outByid(dataId))
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
||||||
|
responseData.value.personId = data.profileId;
|
||||||
responseData.value.createdAt = data.createdAt;
|
responseData.value.createdAt = data.createdAt;
|
||||||
responseData.value.date =
|
responseData.value.date =
|
||||||
data.date !== null ? new Date(data.date) : new Date();
|
data.date !== null ? new Date(data.date) : new Date();
|
||||||
|
|
@ -500,37 +420,6 @@ const getData = async () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const confirmMessage = async () => {
|
|
||||||
dialogMessage(
|
|
||||||
$q,
|
|
||||||
"ต้องการยืนยันส่งคำร้องไปยัง สกจ หรือไม่?",
|
|
||||||
"ข้อมูลจะถูกนำส่งคำร้องไปยัง สกจ ทันที",
|
|
||||||
"mdi-help-circle-outline",
|
|
||||||
"ยืนยัน",
|
|
||||||
"primary",
|
|
||||||
() => sendConfirm(),
|
|
||||||
undefined
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const sendConfirm = async () => {
|
|
||||||
showLoader();
|
|
||||||
await http;
|
|
||||||
// .get(config.API.transferConfirmId(personId.toString()))
|
|
||||||
// .then((res: any) => {
|
|
||||||
// // const data = res.data.result;
|
|
||||||
// // console.log(data);
|
|
||||||
// success($q, "ส่งคำร้องข้อมูลสำเร็จ");
|
|
||||||
// })
|
|
||||||
// .catch((e) => {
|
|
||||||
// messageError($q, e);
|
|
||||||
// })
|
|
||||||
// .finally(async () => {
|
|
||||||
// await getData();
|
|
||||||
// hideLoader();
|
|
||||||
// });
|
|
||||||
};
|
|
||||||
|
|
||||||
const conditionSave = async () => {
|
const conditionSave = async () => {
|
||||||
if (myForm.value !== null) {
|
if (myForm.value !== null) {
|
||||||
myForm.value.validate().then((success) => {
|
myForm.value.validate().then((success) => {
|
||||||
|
|
@ -563,7 +452,7 @@ const saveData = async () => {
|
||||||
};
|
};
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.outByid(personId.toString()), body)
|
.put(config.API.outByid(dataId), body)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
// const data = res.data.result;
|
// const data = res.data.result;
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
icon-right="mdi-open-in-new"
|
icon-right="mdi-open-in-new"
|
||||||
class="q-px-sm"
|
class="q-px-sm"
|
||||||
label="ดูข้อมูลทะเบียนประวัติ"
|
label="ดูข้อมูลทะเบียนประวัติ"
|
||||||
@click="router.push(`/registry/${personId}`)"
|
@click="router.push(`/registry/${responseData.personId}`)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
|
|
@ -66,88 +66,6 @@
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
<!-- <q-card bordered class="row col-12 text-dark q-mt-sm">
|
|
||||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
|
||||||
<div class="q-pl-sm text-weight-bold text-dark">ข้อมูลการไล่ออก</div>
|
|
||||||
<q-space />
|
|
||||||
<q-btn
|
|
||||||
v-if="!roleAdmin"
|
|
||||||
outline
|
|
||||||
color="primary"
|
|
||||||
dense
|
|
||||||
icon-right="arrow_forward"
|
|
||||||
class="q-px-sm"
|
|
||||||
label="ส่งคำร้องไปยัง สกจ."
|
|
||||||
@click="confirmMessage"
|
|
||||||
/>
|
|
||||||
<q-btn
|
|
||||||
v-else
|
|
||||||
outline
|
|
||||||
color="primary"
|
|
||||||
dense
|
|
||||||
icon-right="download"
|
|
||||||
class="q-px-sm"
|
|
||||||
label="ดาวน์โหลด"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col-12"><q-separator /></div>
|
|
||||||
<div class="row col-12 q-pa-md">
|
|
||||||
<div class="col-12 row bg-white q-col-gutter-md">
|
|
||||||
<div class="col-xs-6 col-sm-3 row items-center">
|
|
||||||
<div class="col-12">
|
|
||||||
<div class="col-12 text-top">หน่วยงานที่ไล่ออก</div>
|
|
||||||
<div class="col-12 text-detail">
|
|
||||||
{{ responseData.organization }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-6 col-sm-3 row items-center">
|
|
||||||
<div class="col-12">
|
|
||||||
<div class="col-12 text-top">เหตุผลที่ไล่ออก</div>
|
|
||||||
<div class="col-12 text-detail">
|
|
||||||
{{ responseData.reason }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</q-card>
|
|
||||||
|
|
||||||
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
|
||||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
|
||||||
<div class="q-pl-sm text-weight-bold text-dark">เอกสารเพิ่มเติม</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-12"><q-separator /></div>
|
|
||||||
<div class="col-12">
|
|
||||||
<d-table
|
|
||||||
:rows="rows"
|
|
||||||
:columns="columns"
|
|
||||||
row-key="fileName"
|
|
||||||
hide-header
|
|
||||||
hide-bottom
|
|
||||||
>
|
|
||||||
<template v-slot:body="props">
|
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
|
||||||
<q-td key="no" :props="props">
|
|
||||||
{{ props.rowIndex + 1 }}
|
|
||||||
</q-td>
|
|
||||||
<q-td key="fileName" :props="props">
|
|
||||||
{{ props.row.fileName }}
|
|
||||||
</q-td>
|
|
||||||
<q-td key="btnMicrosoft" :props="props">
|
|
||||||
<q-btn flat dense round color="red" icon="picture_as_pdf">
|
|
||||||
<q-tooltip>ไฟล์ PDF</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
<q-btn flat dense round color="blue" icon="mdi-file-word">
|
|
||||||
<q-tooltip>ไฟล์ WORD</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-td>
|
|
||||||
</q-tr>
|
|
||||||
</template>
|
|
||||||
</d-table>
|
|
||||||
</div>
|
|
||||||
</q-card> -->
|
|
||||||
|
|
||||||
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||||
<div class="q-pl-sm text-weight-bold text-dark">
|
<div class="q-pl-sm text-weight-bold text-dark">
|
||||||
|
|
@ -387,7 +305,7 @@ const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
||||||
const personId = route.params.id;
|
const dataId = route.params.id.toString();
|
||||||
const {
|
const {
|
||||||
date2Thai,
|
date2Thai,
|
||||||
dialogMessage,
|
dialogMessage,
|
||||||
|
|
@ -411,6 +329,7 @@ const date = ref<Date | null>(null);
|
||||||
const reason = ref<string>("");
|
const reason = ref<string>("");
|
||||||
|
|
||||||
const responseData = ref<ResponseDataDetail>({
|
const responseData = ref<ResponseDataDetail>({
|
||||||
|
personId: "",
|
||||||
avataPath: "",
|
avataPath: "",
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
date: new Date(),
|
date: new Date(),
|
||||||
|
|
@ -468,10 +387,11 @@ onMounted(async () => {
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.expulsionByid(personId.toString()))
|
.get(config.API.expulsionByid(dataId))
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
||||||
|
responseData.value.personId = data.profileId;
|
||||||
responseData.value.createdAt = data.createdAt;
|
responseData.value.createdAt = data.createdAt;
|
||||||
responseData.value.date =
|
responseData.value.date =
|
||||||
data.date !== null ? new Date(data.date) : new Date();
|
data.date !== null ? new Date(data.date) : new Date();
|
||||||
|
|
@ -508,37 +428,6 @@ const getData = async () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const confirmMessage = async () => {
|
|
||||||
dialogMessage(
|
|
||||||
$q,
|
|
||||||
"ต้องการยืนยันส่งคำร้องไปยัง สกจ หรือไม่?",
|
|
||||||
"ข้อมูลจะถูกนำส่งคำร้องไปยัง สกจ ทันที",
|
|
||||||
"mdi-help-circle-outline",
|
|
||||||
"ยืนยัน",
|
|
||||||
"primary",
|
|
||||||
() => sendConfirm(),
|
|
||||||
undefined
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const sendConfirm = async () => {
|
|
||||||
showLoader();
|
|
||||||
await http;
|
|
||||||
// .get(config.API.transferConfirmId(personId.toString()))
|
|
||||||
// .then((res: any) => {
|
|
||||||
// // const data = res.data.result;
|
|
||||||
// // console.log(data);
|
|
||||||
// success($q, "ส่งคำร้องข้อมูลสำเร็จ");
|
|
||||||
// })
|
|
||||||
// .catch((e) => {
|
|
||||||
// messageError($q, e);
|
|
||||||
// })
|
|
||||||
// .finally(async () => {
|
|
||||||
// await getData();
|
|
||||||
// hideLoader();
|
|
||||||
// });
|
|
||||||
};
|
|
||||||
|
|
||||||
const conditionSave = async () => {
|
const conditionSave = async () => {
|
||||||
if (myForm.value !== null) {
|
if (myForm.value !== null) {
|
||||||
myForm.value.validate().then((success) => {
|
myForm.value.validate().then((success) => {
|
||||||
|
|
@ -571,7 +460,7 @@ const saveData = async () => {
|
||||||
};
|
};
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.expulsionByid(personId.toString()), body)
|
.put(config.API.expulsionByid(dataId), body)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
// const data = res.data.result;
|
// const data = res.data.result;
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ interface TypeFile {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ResponseDataDetail {
|
interface ResponseDataDetail {
|
||||||
|
personId: string;
|
||||||
avataPath: string;
|
avataPath: string;
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
date: Date;
|
date: Date;
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ interface TypeFile {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ResponseDataDetail {
|
interface ResponseDataDetail {
|
||||||
|
personId: string;
|
||||||
avataPath: string;
|
avataPath: string;
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
date: Date;
|
date: Date;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue