Merge branch 'develop' into devTee
This commit is contained in:
commit
c63539190d
3 changed files with 237 additions and 185 deletions
|
|
@ -30,6 +30,7 @@ import TabMain from "@/modules/04_registryPerson/components/detail/TabMain.vue";
|
|||
*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import avatar from "@/assets/avatar_user.jpg";
|
||||
import CardNotPermission from "@/components/CardNotPermission.vue";
|
||||
|
||||
/**
|
||||
* use
|
||||
|
|
@ -50,6 +51,9 @@ const {
|
|||
pathRegistryEmp,
|
||||
} = useCounterMixin();
|
||||
|
||||
const isPermission = ref<boolean | null>(null);
|
||||
const notPermissionMsg = ref<string>("");
|
||||
|
||||
/** ถึงเเก่กรรม */
|
||||
const dialogPassaway = ref<boolean>(false);
|
||||
const placeDeathCertificate = ref("");
|
||||
|
|
@ -275,9 +279,16 @@ async function fetchDataPersonal() {
|
|||
} else {
|
||||
profilePicture.value = avatar;
|
||||
}
|
||||
|
||||
isPermission.value = true;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
if (err.response.data.status == 403) {
|
||||
isPermission.value = false;
|
||||
notPermissionMsg.value = err.response.data.message;
|
||||
} else {
|
||||
messageError($q, err);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -654,190 +665,205 @@ onMounted(async () => {
|
|||
</div>
|
||||
<q-space />
|
||||
|
||||
<!-- list menu ของข้าราชการฯ -->
|
||||
<q-btn-dropdown
|
||||
v-if="
|
||||
empType === '' &&
|
||||
checkPermissionList([
|
||||
'SYS_TEMPDUTY',
|
||||
'SYS_TEMPDUTY2',
|
||||
'SYS_PROMOTION_OFFICER',
|
||||
'SYS_PASSAWAY',
|
||||
'SYS_DISMISS',
|
||||
'SYS_PLACEMENT_OTHER',
|
||||
])
|
||||
"
|
||||
size="md"
|
||||
rounded
|
||||
unelevated
|
||||
color="grey-4"
|
||||
text-color="red"
|
||||
icon="mdi-home-export-outline"
|
||||
dropdown-icon="mdi-chevron-down"
|
||||
>
|
||||
<q-list v-for="(item, index) in itemsMenu" :key="index">
|
||||
<q-item
|
||||
v-if="checkPermissionCreate(item.system)"
|
||||
clickable
|
||||
@click="
|
||||
item.name == 'ช่วยราชการ'
|
||||
? helpPost()
|
||||
: item.name == 'ส่งตัวกลับ'
|
||||
? repatriationPost()
|
||||
: item.name == 'แต่งตั้ง-เลื่อน-ย้าย'
|
||||
? appointPost()
|
||||
: item.name == 'ถึงแก่กรรม'
|
||||
? clickPassaway()
|
||||
: item.name == 'ให้ออกจากราชการ'
|
||||
? outPost()
|
||||
: item.name == 'อื่นๆ'
|
||||
? otherPost()
|
||||
: null
|
||||
"
|
||||
v-close-popup
|
||||
>
|
||||
<q-item-section>{{ item.name }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-btn-dropdown>
|
||||
|
||||
<!-- list menu ของลูกจ้างประจำ -->
|
||||
<q-btn-dropdown
|
||||
v-if="
|
||||
empType === '-employee' &&
|
||||
checkPermissionList(['SYS_PROMOTION_EMP', 'SYS_PASSAWAY'])
|
||||
"
|
||||
size="md"
|
||||
rounded
|
||||
unelevated
|
||||
color="grey-4"
|
||||
text-color="red"
|
||||
icon="mdi-home-export-outline"
|
||||
dropdown-icon="mdi-chevron-down"
|
||||
>
|
||||
<q-list v-for="item in itemsMenuEmployee" :key="item.id">
|
||||
<q-item
|
||||
v-if="checkPermissionCreate(item.system)"
|
||||
clickable
|
||||
@click="
|
||||
item.name == 'ปรับระดับชั้นงาน - ย้าย'
|
||||
? appointEmployeePost()
|
||||
: item.name == 'ถึงแก่กรรม'
|
||||
? clickPassaway()
|
||||
: null
|
||||
"
|
||||
v-close-popup
|
||||
>
|
||||
<q-item-section>{{ item.name }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-btn-dropdown>
|
||||
|
||||
<q-btn
|
||||
unelevated
|
||||
round
|
||||
color="grey-4"
|
||||
text-color="primary"
|
||||
icon="mdi-file-eye-outline"
|
||||
size="md"
|
||||
>
|
||||
<q-tooltip>ดาวน์โหลดไฟล์</q-tooltip>
|
||||
<q-menu>
|
||||
<q-list style="min-width: 130px">
|
||||
<q-item clickable v-close-popup @click="onClickDownloadKp7('FULL')">
|
||||
<q-item-section class="text-blue">ก.พ.7/ก.ก.1</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup @click="onClickDownloadKp7('SHORT')">
|
||||
<q-item-section class="text-primary">ประวัติแบบย่อ</q-item-section>
|
||||
<div v-if="isPermission">
|
||||
<!-- list menu ของข้าราชการฯ -->
|
||||
<q-btn-dropdown
|
||||
v-if="
|
||||
empType === '' &&
|
||||
checkPermissionList([
|
||||
'SYS_TEMPDUTY',
|
||||
'SYS_TEMPDUTY2',
|
||||
'SYS_PROMOTION_OFFICER',
|
||||
'SYS_PASSAWAY',
|
||||
'SYS_DISMISS',
|
||||
'SYS_PLACEMENT_OTHER',
|
||||
])
|
||||
"
|
||||
size="md"
|
||||
rounded
|
||||
unelevated
|
||||
color="grey-4"
|
||||
text-color="red"
|
||||
icon="mdi-home-export-outline"
|
||||
dropdown-icon="mdi-chevron-down"
|
||||
>
|
||||
<q-list v-for="(item, index) in itemsMenu" :key="index">
|
||||
<q-item
|
||||
v-if="checkPermissionCreate(item.system)"
|
||||
clickable
|
||||
@click="
|
||||
item.name == 'ช่วยราชการ'
|
||||
? helpPost()
|
||||
: item.name == 'ส่งตัวกลับ'
|
||||
? repatriationPost()
|
||||
: item.name == 'แต่งตั้ง-เลื่อน-ย้าย'
|
||||
? appointPost()
|
||||
: item.name == 'ถึงแก่กรรม'
|
||||
? clickPassaway()
|
||||
: item.name == 'ให้ออกจากราชการ'
|
||||
? outPost()
|
||||
: item.name == 'อื่นๆ'
|
||||
? otherPost()
|
||||
: null
|
||||
"
|
||||
v-close-popup
|
||||
>
|
||||
<q-item-section>{{ item.name }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</q-btn-dropdown>
|
||||
|
||||
<!-- list menu ของลูกจ้างประจำ -->
|
||||
<q-btn-dropdown
|
||||
v-if="
|
||||
empType === '-employee' &&
|
||||
checkPermissionList(['SYS_PROMOTION_EMP', 'SYS_PASSAWAY'])
|
||||
"
|
||||
size="md"
|
||||
rounded
|
||||
unelevated
|
||||
color="grey-4"
|
||||
text-color="red"
|
||||
icon="mdi-home-export-outline"
|
||||
dropdown-icon="mdi-chevron-down"
|
||||
>
|
||||
<q-list v-for="item in itemsMenuEmployee" :key="item.id">
|
||||
<q-item
|
||||
v-if="checkPermissionCreate(item.system)"
|
||||
clickable
|
||||
@click="
|
||||
item.name == 'ปรับระดับชั้นงาน - ย้าย'
|
||||
? appointEmployeePost()
|
||||
: item.name == 'ถึงแก่กรรม'
|
||||
? clickPassaway()
|
||||
: null
|
||||
"
|
||||
v-close-popup
|
||||
>
|
||||
<q-item-section>{{ item.name }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-btn-dropdown>
|
||||
|
||||
<q-btn
|
||||
unelevated
|
||||
round
|
||||
color="grey-4"
|
||||
text-color="primary"
|
||||
icon="mdi-file-eye-outline"
|
||||
size="md"
|
||||
>
|
||||
<q-tooltip>ดาวน์โหลดไฟล์</q-tooltip>
|
||||
<q-menu>
|
||||
<q-list style="min-width: 130px">
|
||||
<q-item clickable v-close-popup @click="onClickDownloadKp7('FULL')">
|
||||
<q-item-section class="text-blue">ก.พ.7/ก.ก.1</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="onClickDownloadKp7('SHORT')"
|
||||
>
|
||||
<q-item-section class="text-primary"
|
||||
>ประวัติแบบย่อ</q-item-section
|
||||
>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<q-card class="my-card" flat bordered>
|
||||
<q-card-section>
|
||||
<div class="col row items-center">
|
||||
<div class="row col-12">
|
||||
<div class="col" style="padding-left: 13%">
|
||||
<div class="col-12 text-primary">
|
||||
<h2
|
||||
class="title q-ma-none q-pa-none"
|
||||
v-if="formDetail && formDetail.firstName && formDetail.lastName"
|
||||
>
|
||||
{{
|
||||
`${formDetail?.prefix ? formDetail?.prefix : ""}${
|
||||
formDetail?.firstName
|
||||
} ${formDetail?.lastName} ${leaveReason}`
|
||||
}}
|
||||
</h2>
|
||||
<div v-if="isPermission">
|
||||
<q-card class="my-card" flat bordered>
|
||||
<q-card-section>
|
||||
<div class="col row items-center">
|
||||
<div class="row col-12">
|
||||
<div class="col" style="padding-left: 13%">
|
||||
<div class="col-12 text-primary">
|
||||
<h2
|
||||
class="title q-ma-none q-pa-none"
|
||||
v-if="
|
||||
formDetail && formDetail.firstName && formDetail.lastName
|
||||
"
|
||||
>
|
||||
{{
|
||||
`${formDetail?.prefix ? formDetail?.prefix : ""}${
|
||||
formDetail?.firstName
|
||||
} ${formDetail?.lastName} ${leaveReason}`
|
||||
}}
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-card-section style="padding: 0px">
|
||||
<div
|
||||
class="absolute"
|
||||
style="top: 0; left: 12px; transform: translateY(-50%)"
|
||||
>
|
||||
<q-avatar size="90px" class="bg-grey-2">
|
||||
<q-img :src="profilePicture" />
|
||||
</q-avatar>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
round
|
||||
text-color="edit"
|
||||
icon="mdi-pencil"
|
||||
@click="openDialogImg"
|
||||
size="sm"
|
||||
unelevated
|
||||
class="bg-white btnEditImg"
|
||||
</q-card-section>
|
||||
<q-card-section style="padding: 0px">
|
||||
<div
|
||||
class="absolute"
|
||||
style="top: 0; left: 12px; transform: translateY(-50%)"
|
||||
>
|
||||
<q-tooltip>แก้ไขรูปโปรไฟล์</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
<q-avatar size="90px" class="bg-grey-2">
|
||||
<q-img :src="profilePicture" />
|
||||
</q-avatar>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
round
|
||||
text-color="edit"
|
||||
icon="mdi-pencil"
|
||||
@click="openDialogImg"
|
||||
size="sm"
|
||||
unelevated
|
||||
class="bg-white btnEditImg"
|
||||
>
|
||||
<q-tooltip>แก้ไขรูปโปรไฟล์</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
<div class="row items-center bg-toolbar">
|
||||
<div class="row col-12" style="padding-left: 14%">
|
||||
<div class="col-4">
|
||||
<div class="col-sm-3 col-md-3">
|
||||
<div class="col text-grey-6 text-caption">
|
||||
{{ empType === "" ? "ตำแหน่งในสายงาน" : "ตำแหน่ง" }}
|
||||
</div>
|
||||
<div class="col">{{ formDetail?.position || "-" }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="col-sm-3 col-md-3">
|
||||
<div class="col text-grey-6 text-caption">
|
||||
{{ empType === "" ? "ตำแหน่งประเภท" : "กลุ่มงาน" }}
|
||||
</div>
|
||||
<div class="col">
|
||||
{{ formDetail?.posType?.posTypeName || "-" }}
|
||||
<div class="row items-center bg-toolbar">
|
||||
<div class="row col-12" style="padding-left: 14%">
|
||||
<div class="col-4">
|
||||
<div class="col-sm-3 col-md-3">
|
||||
<div class="col text-grey-6 text-caption">
|
||||
{{ empType === "" ? "ตำแหน่งในสายงาน" : "ตำแหน่ง" }}
|
||||
</div>
|
||||
<div class="col">{{ formDetail?.position || "-" }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="col-sm-3 col-md-3">
|
||||
<div class="col text-grey-6 text-caption">
|
||||
{{ empType === "" ? "ระดับ" : "ระดับชั้นงาน" }}
|
||||
<div class="col-4">
|
||||
<div class="col-sm-3 col-md-3">
|
||||
<div class="col text-grey-6 text-caption">
|
||||
{{ empType === "" ? "ตำแหน่งประเภท" : "กลุ่มงาน" }}
|
||||
</div>
|
||||
<div class="col">
|
||||
{{ formDetail?.posType?.posTypeName || "-" }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
{{ formDetail?.posLevel?.posLevelName || "-" }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="col-sm-3 col-md-3">
|
||||
<div class="col text-grey-6 text-caption">
|
||||
{{ empType === "" ? "ระดับ" : "ระดับชั้นงาน" }}
|
||||
</div>
|
||||
<div class="col">
|
||||
{{ formDetail?.posLevel?.posLevelName || "-" }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card-section>
|
||||
|
||||
<q-separator />
|
||||
</q-card>
|
||||
<q-separator />
|
||||
</q-card>
|
||||
|
||||
<q-card bordered class="q-mt-md rounded">
|
||||
<TabMain :fetchDataPersonal="fetchDataPersonal" />
|
||||
</q-card>
|
||||
<q-card bordered class="q-mt-md rounded">
|
||||
<TabMain :fetchDataPersonal="fetchDataPersonal" />
|
||||
</q-card>
|
||||
</div>
|
||||
<div v-else-if="isPermission !== null && !isPermission">
|
||||
<CardNotPermission :message="notPermissionMsg" />
|
||||
</div>
|
||||
|
||||
<!-- Dialog แนบใบมรณบัตร -->
|
||||
<q-dialog v-model="dialogPassaway" persistent>
|
||||
|
|
|
|||
|
|
@ -327,7 +327,7 @@ const uploadFile = async (event: any, signDate: any) => {
|
|||
config.API.fileRetirement(retireld.value.toString()),
|
||||
formdata
|
||||
)
|
||||
.then(async(res) => {
|
||||
.then(async (res) => {
|
||||
fileUpload.value = null;
|
||||
signDate.value = null;
|
||||
modalUpload.value = false;
|
||||
|
|
@ -339,9 +339,7 @@ const uploadFile = async (event: any, signDate: any) => {
|
|||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
|
||||
});
|
||||
.finally(() => {});
|
||||
},
|
||||
"ยืนยันการอัปโหลดเอกสาร",
|
||||
"ต้องการยืนยันการอัปโหลดเอกสารนี้หรือไม่ ?"
|
||||
|
|
@ -458,9 +456,9 @@ function updatemodalPersonal(modal: boolean) {
|
|||
:UpdateListId="UpdateListId"
|
||||
v-if="
|
||||
!checkRoutePermisson &&
|
||||
statusReport === false &&
|
||||
!statusReport &&
|
||||
(typeReport == 'ADD' || typeReport == '' || typeReport == null) &&
|
||||
statusUpload !== true
|
||||
!statusUpload
|
||||
"
|
||||
/>
|
||||
<q-btn color="primary" flat round icon="mdi-dots-vertical">
|
||||
|
|
@ -474,7 +472,7 @@ function updatemodalPersonal(modal: boolean) {
|
|||
(modalUpload = true), (signDate = null), (fileUpload = null)
|
||||
"
|
||||
target="_blank"
|
||||
v-if="statusUpload !== true && !checkRoutePermisson"
|
||||
v-if="!statusUpload && !checkRoutePermisson"
|
||||
>
|
||||
<q-item-section avatar
|
||||
><q-icon color="blue" name="attach_file"
|
||||
|
|
@ -609,21 +607,27 @@ function updatemodalPersonal(modal: boolean) {
|
|||
<q-tr
|
||||
:props="props"
|
||||
:style="props.row.profileId === profileId && 'color: #26a69a;'"
|
||||
|
||||
>
|
||||
<q-td auto-width>
|
||||
<q-btn flat round dense icon="mdi-eye" color="info" @click.stop="onclickViewinfo(props.row.profileId)">
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="mdi-eye"
|
||||
color="info"
|
||||
@click.stop="onclickViewinfo(props.row.profileId)"
|
||||
>
|
||||
<q-tooltip>ดูข้อมูลในทะเบียนประวัติ</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
v-if="!checkRoutePermisson&&
|
||||
v-if="
|
||||
(props.row.remove === 'EDIT' ||
|
||||
props.row.remove === 'REMOVE') &&
|
||||
statusUpload
|
||||
"
|
||||
flat
|
||||
round
|
||||
:color="props.row.remove === 'EDIT' ? 'primary' : 'red-14'"
|
||||
:color="props.row.remove === 'EDIT' ? 'edit' : 'red-14'"
|
||||
icon="info"
|
||||
dense
|
||||
@click.stop="
|
||||
|
|
@ -632,7 +636,7 @@ function updatemodalPersonal(modal: boolean) {
|
|||
(note = props.row.reason),
|
||||
(retireProfileId = props.row.id)
|
||||
"
|
||||
><q-tooltip>ข้อมูล</q-tooltip></q-btn
|
||||
><q-tooltip>ดูเหตุผล</q-tooltip></q-btn
|
||||
>
|
||||
<q-btn
|
||||
v-if="
|
||||
|
|
@ -640,8 +644,8 @@ function updatemodalPersonal(modal: boolean) {
|
|||
(typeReport === 'EDIT' ||
|
||||
typeReport === null ||
|
||||
typeReport === '') &&
|
||||
statusReport === false &&
|
||||
statusUpload !== true
|
||||
!statusReport &&
|
||||
!statusUpload
|
||||
"
|
||||
flat
|
||||
round
|
||||
|
|
@ -663,7 +667,7 @@ function updatemodalPersonal(modal: boolean) {
|
|||
(typeReport === 'REMOVE' ||
|
||||
typeReport === null ||
|
||||
typeReport === '') &&
|
||||
statusReport === false &&
|
||||
!statusReport &&
|
||||
statusUpload !== true
|
||||
"
|
||||
flat
|
||||
|
|
@ -727,7 +731,10 @@ function updatemodalPersonal(modal: boolean) {
|
|||
<!-- note -->
|
||||
<q-dialog v-model="modalNote" persistent>
|
||||
<q-card style="width: 50vw">
|
||||
<DialogHeader :tittle="checkRoutePermisson ? 'เหตุผล':'กรอกเหตุผล'" :close="closeDialog" />
|
||||
<DialogHeader
|
||||
:tittle="checkRoutePermisson ? 'เหตุผล' : 'กรอกเหตุผล'"
|
||||
:close="closeDialog"
|
||||
/>
|
||||
<q-separator />
|
||||
<q-card-section>
|
||||
<div class="row q-col-gutter-sm">
|
||||
|
|
@ -747,9 +754,12 @@ function updatemodalPersonal(modal: boolean) {
|
|||
</div>
|
||||
</q-card-section>
|
||||
|
||||
<q-separator v-if="!checkRoutePermisson"/>
|
||||
<q-separator v-if="!checkRoutePermisson" />
|
||||
|
||||
<q-card-actions align="right" v-if="!statusUpload&&!checkRoutePermisson">
|
||||
<q-card-actions
|
||||
align="right"
|
||||
v-if="!statusUpload && !checkRoutePermisson"
|
||||
>
|
||||
<q-btn
|
||||
v-if="action === 'delete'"
|
||||
unelevated
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue