Exit interview
This commit is contained in:
parent
dd38cd0034
commit
c134fcd7db
5 changed files with 135 additions and 31 deletions
|
|
@ -12,6 +12,8 @@ import type { ResponseItems } from "@/modules/06_retirement/interface/response/e
|
|||
import DialogFooter from "@/modules/05_placement/components/PersonalList/DialogFooter.vue";
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
|
||||
/** use */
|
||||
const $q = useQuasar(); //ใช้ noti quasar
|
||||
const router = useRouter();
|
||||
|
|
@ -293,6 +295,10 @@ const openModalCalendar = (rows: any) => {
|
|||
<div class="row col-12 q-col-gutter-sm">
|
||||
<div>
|
||||
<q-btn
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsGet &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
"
|
||||
color="blue-9"
|
||||
icon="mdi-square-edit-outline"
|
||||
outline
|
||||
|
|
@ -354,12 +360,41 @@ const openModalCalendar = (rows: any) => {
|
|||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-tr :props="props">
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="!props.row.appointDate"
|
||||
flat
|
||||
dense
|
||||
round
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
color="info"
|
||||
icon="mdi-eye"
|
||||
@click="
|
||||
router.push(
|
||||
`/retirement/exit-interview/questionnair-detail/${props.row.id}`
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-tooltip>รายละเอียด</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsGet && checkPermission($route)?.attrIsUpdate"
|
||||
flat
|
||||
dense
|
||||
round
|
||||
color="edit"
|
||||
icon="edit"
|
||||
@click="
|
||||
router.push(
|
||||
`/retirement/exit-interview/questionnair/${props.row.id}`
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
v-if="!props.row.appointDate && checkPermission($route)?.attrIsGet && checkPermission($route)?.attrIsUpdate"
|
||||
icon="mdi-calendar"
|
||||
size="12px"
|
||||
color="blue-7"
|
||||
flat
|
||||
round
|
||||
|
|
@ -369,25 +404,12 @@ const openModalCalendar = (rows: any) => {
|
|||
<q-tooltip>วันนัดหมายเพื่อทําการสัมภาษณ์การลาออก</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td
|
||||
key="no"
|
||||
:props="props"
|
||||
@click="
|
||||
router.push(
|
||||
`/retirement/exit-interview/questionnair/${props.row.id}`
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-td key="no" :props="props">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="fullname"
|
||||
:props="props"
|
||||
@click="
|
||||
router.push(
|
||||
`/retirement/exit-interview/questionnair/${props.row.id}`
|
||||
)
|
||||
"
|
||||
>
|
||||
{{ props.row.fullname }}
|
||||
</q-td>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import CardProfile from "@/components/CardProfile.vue";
|
|||
const $q = useQuasar();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const checkRoutePermisson = ref<boolean>(route.name == "exit-Interview-detailsOnly");
|
||||
const mixin = useCounterMixin();
|
||||
const dataId = route.params.id.toString();
|
||||
const {
|
||||
|
|
@ -326,6 +327,7 @@ const putData = () => {
|
|||
<q-input
|
||||
dense
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="score[0].score"
|
||||
label="คะแนนข้อ 1"
|
||||
type="number"
|
||||
|
|
@ -345,6 +347,7 @@ const putData = () => {
|
|||
v-if="reasonWork.includes(question1Answer.length - 1)"
|
||||
v-model="reasonWorkOther"
|
||||
disable
|
||||
:readonly="checkRoutePermisson"
|
||||
label="กรอกข้อความ"
|
||||
dense
|
||||
lazy-rules
|
||||
|
|
@ -368,6 +371,7 @@ const putData = () => {
|
|||
<div class="col-2">
|
||||
<q-input
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
outlined
|
||||
v-model="score[1].score"
|
||||
label="คะแนนข้อ 2"
|
||||
|
|
@ -394,6 +398,7 @@ const putData = () => {
|
|||
<q-input
|
||||
dense
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="score[2].score"
|
||||
label="คะแนนข้อ 3"
|
||||
type="number"
|
||||
|
|
@ -416,6 +421,7 @@ const putData = () => {
|
|||
dense
|
||||
disable
|
||||
lazy-rules
|
||||
:readonly="checkRoutePermisson"
|
||||
type="text"
|
||||
autogrow
|
||||
hide-bottom-space
|
||||
|
|
@ -436,6 +442,7 @@ const putData = () => {
|
|||
<div class="col-2">
|
||||
<q-input
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
outlined
|
||||
v-model="score[3].score"
|
||||
label="คะแนนข้อ 4"
|
||||
|
|
@ -459,6 +466,7 @@ const putData = () => {
|
|||
dense
|
||||
disable
|
||||
lazy-rules
|
||||
:readonly="checkRoutePermisson"
|
||||
type="text"
|
||||
autogrow
|
||||
hide-bottom-space
|
||||
|
|
@ -480,6 +488,7 @@ const putData = () => {
|
|||
<q-input
|
||||
dense
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="score[4].score"
|
||||
label="คะแนนข้อ 5"
|
||||
type="number"
|
||||
|
|
@ -508,6 +517,7 @@ const putData = () => {
|
|||
<q-input
|
||||
dense
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="score[5].score"
|
||||
label="คะแนนข้อ 6"
|
||||
type="number"
|
||||
|
|
@ -536,6 +546,7 @@ const putData = () => {
|
|||
<q-input
|
||||
dense
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="score[6].score"
|
||||
label="คะแนนข้อ 7"
|
||||
type="number"
|
||||
|
|
@ -558,6 +569,7 @@ const putData = () => {
|
|||
label="กรอกอื่นๆ"
|
||||
dense
|
||||
disable
|
||||
:readonly="checkRoutePermisson"
|
||||
lazy-rules
|
||||
type="text"
|
||||
autogrow
|
||||
|
|
@ -580,6 +592,7 @@ const putData = () => {
|
|||
<q-input
|
||||
dense
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="score[7].score"
|
||||
label="คะแนนข้อ 8"
|
||||
type="number"
|
||||
|
|
@ -603,6 +616,7 @@ const putData = () => {
|
|||
dense
|
||||
lazy-rules
|
||||
disable
|
||||
:readonly="checkRoutePermisson"
|
||||
type="text"
|
||||
autogrow
|
||||
hide-bottom-space
|
||||
|
|
@ -625,6 +639,7 @@ const putData = () => {
|
|||
dense
|
||||
outlined
|
||||
v-model="score[8].score"
|
||||
:readonly="checkRoutePermisson"
|
||||
label="คะแนนข้อ 9"
|
||||
type="number"
|
||||
lazy-rules
|
||||
|
|
@ -645,6 +660,7 @@ const putData = () => {
|
|||
label="กรอกข้อความ"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="checkRoutePermisson"
|
||||
type="text"
|
||||
autogrow
|
||||
hide-bottom-space
|
||||
|
|
@ -668,6 +684,7 @@ const putData = () => {
|
|||
dense
|
||||
outlined
|
||||
v-model="score[9].score"
|
||||
:readonly="checkRoutePermisson"
|
||||
label="คะแนนข้อ 10"
|
||||
type="number"
|
||||
lazy-rules
|
||||
|
|
@ -1050,6 +1067,8 @@ const putData = () => {
|
|||
dense
|
||||
lazy-rules
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
hide-bottom-space
|
||||
v-model="comment"
|
||||
label="กรอกความคิดเห็น"
|
||||
type="textarea"
|
||||
|
|
@ -1068,9 +1087,9 @@ const putData = () => {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<div class="col-12" v-if="!checkRoutePermisson"><q-separator /></div>
|
||||
|
||||
<q-card-actions class="col-12 text-primary q-pa-md">
|
||||
<q-card-actions class="col-12 text-primary q-pa-md" v-if="!checkRoutePermisson">
|
||||
<q-space />
|
||||
<q-btn
|
||||
unelevated
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main";
|
||||
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
/** use */
|
||||
const RetirementData = useRetirementDataStore();
|
||||
const { statusText } = RetirementData;
|
||||
|
|
@ -240,8 +240,11 @@ const pagination = ref({
|
|||
<div class="row col-12 q-col-gutter-sm">
|
||||
<div>
|
||||
<q-btn
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsGet &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
"
|
||||
@click="openModalOrder"
|
||||
size="14px"
|
||||
flat
|
||||
round
|
||||
color="add"
|
||||
|
|
@ -301,18 +304,44 @@ const pagination = ref({
|
|||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th auto-width></q-th>
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td
|
||||
v-for="col in props.cols"
|
||||
:key="col.id"
|
||||
@click="router.push(`/retirement/resign/${props.row.id}`)"
|
||||
>
|
||||
<q-tr :props="props">
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
flat
|
||||
dense
|
||||
round
|
||||
color="info"
|
||||
icon="mdi-eye"
|
||||
@click="
|
||||
router.push(`/retirement/resign-detail/${props.row.id}`)
|
||||
"
|
||||
>
|
||||
<q-tooltip>รายละเอียด</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsGet &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
"
|
||||
flat
|
||||
dense
|
||||
round
|
||||
color="edit"
|
||||
icon="edit"
|
||||
@click="router.push(`/retirement/resign/${props.row.id}`)"
|
||||
>
|
||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td v-for="col in props.cols" :key="col.id">
|
||||
<div v-if="col.name === 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ const personId = ref<string>("");
|
|||
const $q = useQuasar();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailbyid");
|
||||
const mixin = useCounterMixin();
|
||||
const RetirementData = useRetirementDataStore();
|
||||
const {
|
||||
|
|
@ -748,7 +749,11 @@ function removeFile(fileName: string) {
|
|||
<q-space />
|
||||
|
||||
<div
|
||||
v-if="dataDetail.status == 'WAITTING' && roleUser === 'officer'"
|
||||
v-if="
|
||||
dataDetail.status == 'WAITTING' &&
|
||||
roleUser === 'officer' &&
|
||||
!checkRoutePermisson
|
||||
"
|
||||
>
|
||||
<div v-if="!conditions">
|
||||
<q-btn
|
||||
|
|
@ -828,7 +833,11 @@ function removeFile(fileName: string) {
|
|||
<div class="row col-12 q-col-gutter-y-sm q-pa-sm">
|
||||
<div class="col-12 row">
|
||||
<q-file
|
||||
v-if="dataDetail.status == 'WAITTING' && roleUser === 'officer'"
|
||||
v-if="
|
||||
dataDetail.status == 'WAITTING' &&
|
||||
roleUser === 'officer' &&
|
||||
!checkRoutePermisson
|
||||
"
|
||||
class="col-12"
|
||||
for="#evidenceFiles"
|
||||
outlined
|
||||
|
|
@ -884,7 +893,8 @@ function removeFile(fileName: string) {
|
|||
<q-btn
|
||||
v-if="
|
||||
dataDetail.status == 'WAITTING' &&
|
||||
roleUser === 'officer'
|
||||
roleUser === 'officer' &&
|
||||
!checkRoutePermisson
|
||||
"
|
||||
dense
|
||||
flat
|
||||
|
|
@ -1054,7 +1064,7 @@ function removeFile(fileName: string) {
|
|||
</div>
|
||||
<q-space />
|
||||
|
||||
<div v-if="roleUser === 'officer'">
|
||||
<div v-if="roleUser === 'officer' && !checkRoutePermisson">
|
||||
<div class="q-gutter-sm" v-if="!edit">
|
||||
<q-btn
|
||||
outline
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ const resign = () =>
|
|||
import("@/modules/06_retirement/components/resign/Resign.vue");
|
||||
const resignByid = () =>
|
||||
import("@/modules/06_retirement/components/resign/ResignByid.vue");
|
||||
const resignDetailbyid = () =>
|
||||
import("@/modules/06_retirement/components/resign/ResignByid.vue");
|
||||
const deceased = () =>
|
||||
import("@/modules/06_retirement/components/resign/Deceased.vue");
|
||||
const detaildeceased = () =>
|
||||
|
|
@ -36,6 +38,8 @@ const exitInterviewMain = () =>
|
|||
import("@/modules/06_retirement/components/ExitInterview/exitMain.vue");
|
||||
const exitInterviewDetails = () =>
|
||||
import("@/modules/06_retirement/components/ExitInterview/exitRegistry.vue");
|
||||
const exitInterviewDetailsOnly = () =>
|
||||
import("@/modules/06_retirement/components/ExitInterview/exitRegistry.vue");
|
||||
const exitInterviewEditQuestion = () =>
|
||||
import("@/modules/06_retirement/components/ExitInterview/EditQuestion.vue");
|
||||
const detaildeceasedByid = () =>
|
||||
|
|
@ -102,6 +106,16 @@ export default [
|
|||
Role: "STAFF",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/retirement/exit-interview/questionnair-detail/:id",
|
||||
name: "exit-Interview-detailsOnly",
|
||||
component: exitInterviewDetailsOnly,
|
||||
meta: {
|
||||
Auth: true,
|
||||
Key: "SYS_RESIGN_INTERVIEW",
|
||||
Role: "STAFF",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/retirement/exit-interview/edit-question",
|
||||
name: "ExitInterviewEditQuestion",
|
||||
|
|
@ -132,6 +146,16 @@ export default [
|
|||
Role: "STAFF",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/retirement/resign-detail/:id",
|
||||
name: "resignDetailbyid",
|
||||
component: resignDetailbyid,
|
||||
meta: {
|
||||
Auth: true,
|
||||
Key: "SYS_RESIGN",
|
||||
Role: "STAFF",
|
||||
},
|
||||
},
|
||||
// {
|
||||
// path: "/retirement/resign-order",
|
||||
// name: "resign-order",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue