2023-09-29 15:02:04 +07:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { ref, onMounted } from "vue";
|
2024-08-02 16:13:24 +07:00
|
|
|
import { checkPermission } from "@/utils/permissions";
|
2023-09-29 15:02:04 +07:00
|
|
|
import type { QTableProps } from "quasar";
|
|
|
|
|
import { useQuasar } from "quasar";
|
|
|
|
|
import { useRouter } from "vue-router";
|
|
|
|
|
import { useCounterMixin } from "@/stores/mixin";
|
|
|
|
|
import { useTransferDataStore } from "@/modules/05_placement/store";
|
|
|
|
|
import Dialogbody from "@/modules/05_placement/components/AppointEmployee/Dialogbody.vue";
|
2023-10-10 17:29:29 +07:00
|
|
|
// import DialogOrgTree from "@/modules/05_placement/components/AppointEmployee/Modal.vue";
|
2024-06-12 13:12:12 +07:00
|
|
|
|
2023-09-29 15:02:04 +07:00
|
|
|
import type {
|
|
|
|
|
listAppointType,
|
|
|
|
|
resData,
|
|
|
|
|
orgFilter,
|
|
|
|
|
} from "@/modules/05_placement/interface/response/AppointMent";
|
|
|
|
|
import type { OpType } from "@/modules/05_placement/interface/response/Main";
|
|
|
|
|
import http from "@/plugins/http";
|
|
|
|
|
import config from "@/app.config";
|
|
|
|
|
|
2024-08-19 16:14:43 +07:00
|
|
|
import DialogHeader from "@/components/DialogHeader.vue";
|
|
|
|
|
import DialogOrgSelectEmployee from "@/components/Dialogs/DialogOrgSelectEmployee.vue"; //เลือกหน่วยงาน
|
2024-05-17 16:37:55 +07:00
|
|
|
|
2024-05-17 17:20:50 +07:00
|
|
|
const typeModal = ref<string>("");
|
2024-05-17 16:37:55 +07:00
|
|
|
const posType = ref<string>("");
|
|
|
|
|
const posLevel = ref<string>("");
|
|
|
|
|
const position = ref<string>("");
|
|
|
|
|
const dataRows = ref<any[]>([]);
|
|
|
|
|
|
2023-09-29 15:02:04 +07:00
|
|
|
const $q = useQuasar();
|
|
|
|
|
const modal = ref<boolean>(false);
|
|
|
|
|
const storeFn = useTransferDataStore();
|
|
|
|
|
const { statusText } = storeFn;
|
|
|
|
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
|
|
|
|
const {
|
|
|
|
|
showLoader,
|
|
|
|
|
hideLoader,
|
|
|
|
|
success,
|
|
|
|
|
messageError,
|
|
|
|
|
date2Thai,
|
|
|
|
|
dialogRemove,
|
|
|
|
|
} = mixin;
|
|
|
|
|
const router = useRouter();
|
|
|
|
|
const rows = ref<listAppointType[]>([]);
|
|
|
|
|
const rows2 = ref<listAppointType[]>([]);
|
|
|
|
|
const modalTree = ref<boolean>(false);
|
2024-08-19 16:14:43 +07:00
|
|
|
|
2023-09-29 15:02:04 +07:00
|
|
|
const personalId = ref<string>("");
|
|
|
|
|
const filterKeyword = ref<string>("");
|
|
|
|
|
const filterKeyword2 = ref<string>("");
|
|
|
|
|
const filterRef = ref<any>(null);
|
|
|
|
|
const listRecevice = ref<resData[]>([]);
|
|
|
|
|
const optionsType = ref<OpType[]>([]);
|
|
|
|
|
const type = ref<string>("");
|
2024-08-19 16:14:43 +07:00
|
|
|
|
2023-09-29 15:02:04 +07:00
|
|
|
const visibleColumns = ref<string[]>([
|
|
|
|
|
"no",
|
|
|
|
|
"citizenId",
|
|
|
|
|
"fullname",
|
|
|
|
|
"organizationName",
|
|
|
|
|
"birthday",
|
|
|
|
|
"createdAt",
|
|
|
|
|
"status",
|
|
|
|
|
]);
|
|
|
|
|
const pagination = ref({
|
|
|
|
|
sortBy: "createdAt",
|
|
|
|
|
descending: true,
|
|
|
|
|
page: 1,
|
|
|
|
|
rowsPerPage: 10,
|
|
|
|
|
});
|
|
|
|
|
const columns = ref<QTableProps["columns"]>([
|
|
|
|
|
{
|
|
|
|
|
name: "no",
|
|
|
|
|
align: "left",
|
|
|
|
|
label: "ลำดับ",
|
|
|
|
|
sortable: false,
|
|
|
|
|
field: "no",
|
|
|
|
|
headerStyle: "font-size: 14px",
|
|
|
|
|
style: "font-size: 14px",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "citizenId",
|
|
|
|
|
align: "left",
|
|
|
|
|
label: "เลขประจำตัวประชาชน",
|
|
|
|
|
sortable: true,
|
|
|
|
|
field: "citizenId",
|
|
|
|
|
headerStyle: "font-size: 14px",
|
|
|
|
|
style: "font-size: 14px",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "fullname",
|
|
|
|
|
align: "left",
|
|
|
|
|
label: "ชื่อ-นามสกุล",
|
|
|
|
|
sortable: true,
|
|
|
|
|
field: "fullname",
|
|
|
|
|
headerStyle: "font-size: 14px",
|
|
|
|
|
style: "font-size: 14px",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "organizationName",
|
|
|
|
|
align: "left",
|
2024-05-24 14:58:40 +07:00
|
|
|
label: "หน่วยงานที่รับปรับระดับชั้นงาน-ย้าย",
|
2023-09-29 15:02:04 +07:00
|
|
|
sortable: true,
|
|
|
|
|
field: "organizationName",
|
|
|
|
|
headerStyle: "font-size: 14px",
|
|
|
|
|
style: "font-size: 14px",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "birthday",
|
|
|
|
|
align: "left",
|
|
|
|
|
label: "วัน/เดือน/ปี เกิด",
|
|
|
|
|
sortable: true,
|
|
|
|
|
field: "birthday",
|
|
|
|
|
headerStyle: "font-size: 14px",
|
|
|
|
|
style: "font-size: 14px",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "createdAt",
|
|
|
|
|
align: "left",
|
|
|
|
|
label: "วันที่ดำเนินการ",
|
|
|
|
|
sortable: true,
|
|
|
|
|
field: "createdAt",
|
|
|
|
|
headerStyle: "font-size: 14px",
|
|
|
|
|
style: "font-size: 14px",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "status",
|
|
|
|
|
align: "left",
|
|
|
|
|
label: "สถานะ",
|
|
|
|
|
sortable: true,
|
|
|
|
|
field: "status",
|
|
|
|
|
headerStyle: "font-size: 14px",
|
|
|
|
|
style: "font-size: 14px",
|
|
|
|
|
},
|
|
|
|
|
]);
|
2024-08-19 16:14:43 +07:00
|
|
|
/**
|
|
|
|
|
* รีเซ็ต input
|
|
|
|
|
*/
|
|
|
|
|
function resetFilter() {
|
|
|
|
|
filterKeyword.value = "";
|
|
|
|
|
filterKeyword2.value = "";
|
|
|
|
|
filterRef.value.focus();
|
|
|
|
|
}
|
2023-09-29 15:02:04 +07:00
|
|
|
|
2024-08-19 16:14:43 +07:00
|
|
|
/**
|
|
|
|
|
* fetch รายการปรับระดับชั้นงานลูกจ้าง
|
|
|
|
|
*/
|
|
|
|
|
function fecthlistappointment() {
|
2023-10-03 11:00:24 +07:00
|
|
|
showLoader();
|
|
|
|
|
rows.value = [];
|
2024-08-19 16:14:43 +07:00
|
|
|
http
|
2023-10-03 11:00:24 +07:00
|
|
|
.get(config.API.appointEmployee())
|
|
|
|
|
.then((res) => {
|
|
|
|
|
let response = res.data.result;
|
|
|
|
|
listRecevice.value = response;
|
2024-05-24 14:58:40 +07:00
|
|
|
rows.value = response;
|
2024-05-17 16:37:55 +07:00
|
|
|
|
2024-08-19 16:14:43 +07:00
|
|
|
//หารายชื่อส่งไปออกคำสั่ง
|
2023-10-03 11:00:24 +07:00
|
|
|
rows2.value = rows.value.filter(
|
2024-05-17 16:37:55 +07:00
|
|
|
(e: any) =>
|
|
|
|
|
e.root !== null &&
|
|
|
|
|
e.status !== "REPORT" &&
|
|
|
|
|
e.status !== "DONE" &&
|
2023-10-03 11:00:24 +07:00
|
|
|
e.educationOld &&
|
|
|
|
|
e.organizationPositionOld &&
|
|
|
|
|
e.positionTypeOld &&
|
|
|
|
|
e.positionLevelOld &&
|
|
|
|
|
e.positionNumberOld &&
|
|
|
|
|
e.salary !== null &&
|
|
|
|
|
e.positionDate
|
|
|
|
|
);
|
|
|
|
|
})
|
|
|
|
|
.catch((e) => {
|
|
|
|
|
messageError($q, e);
|
|
|
|
|
})
|
|
|
|
|
.finally(() => {
|
|
|
|
|
hideLoader();
|
|
|
|
|
});
|
2024-08-19 16:14:43 +07:00
|
|
|
}
|
2023-10-10 16:13:33 +07:00
|
|
|
|
2024-08-19 16:14:43 +07:00
|
|
|
/**
|
|
|
|
|
* ยืนยันลบรายการปรับระดับชั้นงานลูกจ้าง
|
|
|
|
|
* @param id รายการปรับระดับชั้นงานลูกจ้าง
|
|
|
|
|
*/
|
2023-09-29 15:02:04 +07:00
|
|
|
const clickDelete = (id: string) => {
|
2024-08-19 16:14:43 +07:00
|
|
|
dialogRemove($q, () => {
|
|
|
|
|
showLoader();
|
|
|
|
|
http
|
|
|
|
|
.delete(config.API.appointEmployeeByid(id))
|
|
|
|
|
.then(async () => {
|
|
|
|
|
await fecthlistappointment();
|
|
|
|
|
await success($q, "ลบข้อมูลสำเร็จ");
|
|
|
|
|
})
|
|
|
|
|
.catch((e) => {
|
|
|
|
|
messageError($q, e);
|
|
|
|
|
})
|
|
|
|
|
.finally(() => {
|
|
|
|
|
hideLoader();
|
|
|
|
|
});
|
|
|
|
|
});
|
2023-09-29 15:02:04 +07:00
|
|
|
};
|
|
|
|
|
|
2024-08-19 16:14:43 +07:00
|
|
|
/**
|
|
|
|
|
* redialect รายละเอียดการปรับระดับชั้นงานลูกจ้าง
|
|
|
|
|
* @param id รายการปรับระดับชั้นงานลูกจ้าง
|
|
|
|
|
*/
|
|
|
|
|
function nextPage(id: string) {
|
2023-09-29 15:02:04 +07:00
|
|
|
router.push({
|
2023-10-03 11:58:37 +07:00
|
|
|
path: `appoint-employee/detail/${id}`,
|
2023-09-29 15:02:04 +07:00
|
|
|
});
|
2024-08-19 16:14:43 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* เปิด popup ส่งไปออกคำสั่ง
|
|
|
|
|
*/
|
|
|
|
|
function popup() {
|
2023-10-03 11:00:24 +07:00
|
|
|
modal.value = true;
|
|
|
|
|
filterKeyword2.value = "";
|
2024-08-19 16:14:43 +07:00
|
|
|
}
|
2023-10-10 16:13:33 +07:00
|
|
|
|
2024-08-19 16:14:43 +07:00
|
|
|
/**
|
|
|
|
|
* ปิด popup ส่งไปออกคำสั่ง
|
|
|
|
|
*/
|
|
|
|
|
function clickClose() {
|
|
|
|
|
modal.value = false;
|
|
|
|
|
}
|
2024-05-17 16:37:55 +07:00
|
|
|
|
2024-08-19 16:14:43 +07:00
|
|
|
/**
|
|
|
|
|
* เปิด popup เลือกหน่วยงาน
|
|
|
|
|
* @param data ข้อมูลหน่วยงาน
|
|
|
|
|
* @param type ประเภท ย้าย,ปรับ
|
|
|
|
|
*/
|
2024-05-24 14:58:40 +07:00
|
|
|
function openModalTree(data: any, type: string) {
|
2024-05-17 17:20:50 +07:00
|
|
|
typeModal.value = type;
|
2024-05-17 16:37:55 +07:00
|
|
|
personalId.value = data.id;
|
|
|
|
|
dataRows.value = data;
|
2024-05-24 14:58:40 +07:00
|
|
|
posType.value = data.posTypeNameOld;
|
|
|
|
|
posLevel.value = data.posLevelNameOld;
|
|
|
|
|
position.value = data.positionOld;
|
2024-08-19 16:14:43 +07:00
|
|
|
modalTree.value = true;
|
2024-05-17 16:37:55 +07:00
|
|
|
}
|
|
|
|
|
|
2024-08-19 16:14:43 +07:00
|
|
|
/**
|
|
|
|
|
* ยืนยันการบันทึกข้อมูลเลือกตำแหน่ง
|
|
|
|
|
*/
|
2024-05-17 16:37:55 +07:00
|
|
|
function onSave(data: any) {
|
|
|
|
|
const dataAppoint = {
|
|
|
|
|
node: data.node,
|
|
|
|
|
nodeId: data.nodeId,
|
|
|
|
|
orgRevisionId: data.orgRevisionId,
|
|
|
|
|
positionId: data.positionId,
|
|
|
|
|
posMasterNo: data.posMasterNo,
|
|
|
|
|
positionName: data.positionName,
|
|
|
|
|
posTypeId: data.posTypeId,
|
|
|
|
|
posTypeName: data.posTypeName,
|
|
|
|
|
posLevelId: data.posLevelId,
|
|
|
|
|
posLevelName: data.posLevelName,
|
|
|
|
|
reportingDate: data.reportingDate,
|
|
|
|
|
posmasterId: data.posmasterId,
|
2024-05-17 17:20:50 +07:00
|
|
|
typeCommand: data.typeCommand,
|
2024-05-17 16:37:55 +07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
showLoader();
|
|
|
|
|
http
|
|
|
|
|
.put(config.API.appointmentPosition(personalId.value), dataAppoint)
|
2024-08-19 16:14:43 +07:00
|
|
|
.then(async () => {
|
|
|
|
|
await fecthlistappointment();
|
|
|
|
|
await success($q, "บันทึกสำเร็จ");
|
2024-05-17 16:37:55 +07:00
|
|
|
modalTree.value = false;
|
|
|
|
|
})
|
|
|
|
|
.catch((e) => {
|
|
|
|
|
messageError($q, e);
|
|
|
|
|
})
|
2024-08-19 16:14:43 +07:00
|
|
|
.finally(() => {
|
2024-05-17 16:37:55 +07:00
|
|
|
hideLoader();
|
|
|
|
|
});
|
|
|
|
|
}
|
2024-08-19 16:14:43 +07:00
|
|
|
onMounted(() => {
|
|
|
|
|
fecthlistappointment();
|
|
|
|
|
});
|
2023-09-29 15:02:04 +07:00
|
|
|
</script>
|
2024-08-19 16:14:43 +07:00
|
|
|
|
2023-09-29 15:02:04 +07:00
|
|
|
<template>
|
|
|
|
|
<div class="toptitle text-dark col-12 row items-center">
|
2023-10-24 14:26:36 +07:00
|
|
|
รายการปรับระดับชั้นงานลูกจ้าง
|
2023-09-29 15:02:04 +07:00
|
|
|
</div>
|
|
|
|
|
<q-card flat bordered class="col-12 q-mt-sm">
|
|
|
|
|
<q-separator />
|
|
|
|
|
<div class="row q-pa-md">
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<div class="row col-12">
|
2023-10-11 10:52:28 +07:00
|
|
|
<q-btn
|
2024-08-02 16:13:24 +07:00
|
|
|
v-if="checkPermission($route)?.attrIsUpdate"
|
2023-10-11 10:52:28 +07:00
|
|
|
@click="popup()"
|
|
|
|
|
size="14px"
|
|
|
|
|
flat
|
|
|
|
|
round
|
|
|
|
|
color="add"
|
|
|
|
|
icon="mdi-account-arrow-right"
|
|
|
|
|
>
|
2023-09-29 15:02:04 +07:00
|
|
|
<q-tooltip>ส่งไปออกคำสั่ง</q-tooltip>
|
|
|
|
|
</q-btn>
|
|
|
|
|
|
|
|
|
|
<q-space />
|
2023-10-11 10:52:28 +07:00
|
|
|
<q-input
|
|
|
|
|
class="col-xs-12 col-sm-3 col-md-2"
|
|
|
|
|
standout
|
|
|
|
|
dense
|
|
|
|
|
v-model="filterKeyword"
|
|
|
|
|
ref="filterRef"
|
|
|
|
|
outlined
|
|
|
|
|
debounce="300"
|
|
|
|
|
placeholder="ค้นหา"
|
|
|
|
|
>
|
2023-09-29 15:02:04 +07:00
|
|
|
<template v-slot:append>
|
|
|
|
|
<q-icon v-if="filterKeyword == ''" name="search" />
|
2023-10-11 10:52:28 +07:00
|
|
|
<q-icon
|
|
|
|
|
v-if="filterKeyword !== ''"
|
|
|
|
|
name="clear"
|
|
|
|
|
class="cursor-pointer"
|
|
|
|
|
@click="resetFilter"
|
|
|
|
|
/>
|
2023-09-29 15:02:04 +07:00
|
|
|
</template>
|
|
|
|
|
</q-input>
|
|
|
|
|
|
2023-10-11 10:52:28 +07:00
|
|
|
<q-select
|
|
|
|
|
v-model="visibleColumns"
|
|
|
|
|
multiple
|
|
|
|
|
outlined
|
|
|
|
|
dense
|
|
|
|
|
options-dense
|
|
|
|
|
:display-value="$q.lang.table.columns"
|
|
|
|
|
emit-value
|
|
|
|
|
map-options
|
|
|
|
|
:options="columns"
|
|
|
|
|
option-value="name"
|
|
|
|
|
options-cover
|
|
|
|
|
style="min-width: 150px"
|
|
|
|
|
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
|
|
|
|
|
/>
|
2023-09-29 15:02:04 +07:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-12 q-pt-sm">
|
2023-10-11 10:52:28 +07:00
|
|
|
<d-table
|
|
|
|
|
:columns="columns"
|
|
|
|
|
:rows="rows"
|
|
|
|
|
:filter="filterKeyword"
|
|
|
|
|
row-key="citizenId"
|
|
|
|
|
:visible-columns="visibleColumns"
|
|
|
|
|
v-model:pagination="pagination"
|
|
|
|
|
>
|
2023-09-29 15:02:04 +07:00
|
|
|
<template v-slot:header="props">
|
|
|
|
|
<q-tr :props="props">
|
2024-07-26 16:25:10 +07:00
|
|
|
<q-th auto-width />
|
2023-09-29 15:02:04 +07:00
|
|
|
<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">
|
2024-08-07 09:37:59 +07:00
|
|
|
<q-tr :props="props">
|
|
|
|
|
<q-td auto-width>
|
2023-10-11 10:52:28 +07:00
|
|
|
<q-btn
|
|
|
|
|
v-if="
|
2024-08-07 09:37:59 +07:00
|
|
|
(props.row.status !== 'REPORT' &&
|
|
|
|
|
props.row.status !== 'DONE' &&
|
|
|
|
|
checkPermission($route)?.attrIsGet) ||
|
|
|
|
|
(checkPermission($route)?.attrIsDelete &&
|
|
|
|
|
props.row.status !== 'REPORT' &&
|
|
|
|
|
props.row.status !== 'DONE') ||
|
|
|
|
|
(checkPermission($route)?.attrIsGet &&
|
|
|
|
|
checkPermission($route)?.attrIsDelete) ||
|
|
|
|
|
checkPermission($route)?.attrIsGet
|
2023-10-11 10:52:28 +07:00
|
|
|
"
|
2024-08-07 09:37:59 +07:00
|
|
|
icon="mdi-dots-horizontal-circle-outline"
|
|
|
|
|
color="secondary"
|
2023-10-11 10:52:28 +07:00
|
|
|
flat
|
|
|
|
|
round
|
|
|
|
|
dense
|
|
|
|
|
>
|
|
|
|
|
<q-menu
|
|
|
|
|
transition-show="jump-down"
|
|
|
|
|
transition-hide="jump-up"
|
|
|
|
|
>
|
2023-10-10 17:29:29 +07:00
|
|
|
<q-list dense style="min-width: 200px">
|
2024-05-17 16:37:55 +07:00
|
|
|
<q-item
|
2024-08-07 09:37:59 +07:00
|
|
|
v-if="
|
|
|
|
|
checkPermission($route)?.attrIsUpdate &&
|
|
|
|
|
checkPermission($route)?.attrIsGet &&
|
|
|
|
|
props.row.status !== 'REPORT' &&
|
|
|
|
|
props.row.status !== 'DONE'
|
|
|
|
|
"
|
2024-05-17 16:37:55 +07:00
|
|
|
clickable
|
|
|
|
|
v-close-popup
|
2024-05-24 14:58:40 +07:00
|
|
|
@click="openModalTree(props.row, 'SLIP')"
|
2024-05-17 17:20:50 +07:00
|
|
|
>
|
2024-08-07 09:37:59 +07:00
|
|
|
<q-item-section style="min-width: 0px" avatar>
|
2024-05-17 17:20:50 +07:00
|
|
|
<q-icon
|
|
|
|
|
color="primary"
|
|
|
|
|
size="xs"
|
|
|
|
|
name="mdi-bookmark-outline"
|
|
|
|
|
/>
|
|
|
|
|
</q-item-section>
|
2024-05-24 14:58:40 +07:00
|
|
|
<q-item-section
|
|
|
|
|
>เลือกหน่วยงานที่รับปรับระดับชั้นงาน</q-item-section
|
|
|
|
|
>
|
2024-05-17 17:20:50 +07:00
|
|
|
</q-item>
|
|
|
|
|
<q-item
|
2024-08-07 09:37:59 +07:00
|
|
|
v-if="
|
|
|
|
|
checkPermission($route)?.attrIsUpdate &&
|
|
|
|
|
checkPermission($route)?.attrIsGet &&
|
|
|
|
|
props.row.status !== 'REPORT' &&
|
|
|
|
|
props.row.status !== 'DONE'
|
|
|
|
|
"
|
2024-05-17 17:20:50 +07:00
|
|
|
clickable
|
|
|
|
|
v-close-popup
|
2024-05-24 14:58:40 +07:00
|
|
|
@click="openModalTree(props.row, 'MOVE')"
|
2024-05-17 16:37:55 +07:00
|
|
|
>
|
2024-08-07 09:37:59 +07:00
|
|
|
<q-item-section style="min-width: 0px" avatar>
|
2024-05-17 16:37:55 +07:00
|
|
|
<q-icon
|
|
|
|
|
color="primary"
|
|
|
|
|
size="xs"
|
|
|
|
|
name="mdi-bookmark-outline"
|
|
|
|
|
/>
|
|
|
|
|
</q-item-section>
|
2024-05-24 14:58:40 +07:00
|
|
|
<q-item-section
|
|
|
|
|
>เลือกหน่วยงานที่รับย้าย</q-item-section
|
|
|
|
|
>
|
2023-09-29 15:02:04 +07:00
|
|
|
</q-item>
|
2024-08-07 09:37:59 +07:00
|
|
|
|
|
|
|
|
<q-item
|
|
|
|
|
v-if="checkPermission($route)?.attrIsGet"
|
|
|
|
|
clickable
|
|
|
|
|
v-close-popup
|
|
|
|
|
@click="nextPage(props.row.id)"
|
|
|
|
|
>
|
|
|
|
|
<q-item-section style="min-width: 0px" avatar>
|
|
|
|
|
<q-icon color="info" size="xs" name="mdi-eye" />
|
|
|
|
|
</q-item-section>
|
|
|
|
|
<q-item-section>รายละเอียด</q-item-section>
|
|
|
|
|
</q-item>
|
2023-10-11 10:52:28 +07:00
|
|
|
<q-item
|
2024-08-07 09:37:59 +07:00
|
|
|
v-if="
|
|
|
|
|
checkPermission($route)?.attrIsUpdate &&
|
|
|
|
|
props.row.status !== 'REPORT' &&
|
|
|
|
|
props.row.status !== 'DONE'
|
|
|
|
|
"
|
2023-10-11 10:52:28 +07:00
|
|
|
clickable
|
|
|
|
|
v-close-popup
|
2024-05-17 16:37:55 +07:00
|
|
|
@click="clickDelete(props.row.id)"
|
2023-10-11 10:52:28 +07:00
|
|
|
>
|
2024-08-07 09:37:59 +07:00
|
|
|
<q-item-section style="min-width: 0px" avatar>
|
2023-09-29 15:02:04 +07:00
|
|
|
<q-icon color="red" size="xs" name="mdi-delete" />
|
|
|
|
|
</q-item-section>
|
|
|
|
|
<q-item-section>ลบ</q-item-section>
|
|
|
|
|
</q-item>
|
|
|
|
|
</q-list>
|
|
|
|
|
</q-menu>
|
|
|
|
|
</q-btn>
|
|
|
|
|
</q-td>
|
2024-08-13 09:47:49 +07:00
|
|
|
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
2024-07-26 16:25:10 +07:00
|
|
|
<div v-if="col.name == 'no'">
|
|
|
|
|
{{ props.rowIndex + 1 }}
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else-if="col.name == 'fullname'">
|
|
|
|
|
{{
|
|
|
|
|
props.row.firstName
|
|
|
|
|
? `${props.row.prefix ?? ""}${
|
|
|
|
|
props.row.firstName ?? ""
|
|
|
|
|
} ${props.row.lastName ?? ""}`
|
|
|
|
|
: "-"
|
|
|
|
|
}}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div v-else-if="col.name == 'status'">
|
|
|
|
|
{{ props.row.status ? statusText(props.row.status) : "-" }}
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else-if="col.name == 'dateOfBirth'">
|
|
|
|
|
{{
|
|
|
|
|
props.row.dateOfBirth
|
|
|
|
|
? date2Thai(props.row.dateOfBirth)
|
|
|
|
|
: "-"
|
|
|
|
|
}}
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else-if="col.name == 'organizationName'">
|
|
|
|
|
<div class="col-4">
|
|
|
|
|
<div class="text-weight-medium">
|
|
|
|
|
{{ props.row.root !== null ? props.row.root : "-" }}
|
|
|
|
|
{{
|
|
|
|
|
props.row.rootShortName !== null
|
|
|
|
|
? `(${props.row.rootShortName})`
|
|
|
|
|
: ""
|
|
|
|
|
}}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="text-weight-light">
|
|
|
|
|
{{
|
|
|
|
|
props.row.nodeName !== null ? props.row.nodeName : ""
|
|
|
|
|
}}
|
|
|
|
|
{{
|
|
|
|
|
props.row.nodeShortName !== null
|
|
|
|
|
? `(${props.row.nodeShortName}${props.row.posMasterNo})`
|
|
|
|
|
: ""
|
|
|
|
|
}}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else-if="col.name == 'createdAt'">
|
|
|
|
|
{{
|
|
|
|
|
props.row.createdAt ? date2Thai(props.row.createdAt) : "-"
|
|
|
|
|
}}
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else>
|
|
|
|
|
{{ col.value ? col.value : "-" }}
|
|
|
|
|
</div>
|
|
|
|
|
</q-td>
|
2023-09-29 15:02:04 +07:00
|
|
|
</q-tr>
|
|
|
|
|
</template>
|
|
|
|
|
</d-table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</q-card>
|
2023-10-11 09:38:51 +07:00
|
|
|
|
2023-10-11 10:52:28 +07:00
|
|
|
<Dialogbody
|
|
|
|
|
v-model:Modal="modal"
|
|
|
|
|
:clickClose="clickClose"
|
|
|
|
|
:optionsType="optionsType"
|
|
|
|
|
:rows2="rows2"
|
|
|
|
|
v-model:filterKeyword2="filterKeyword2"
|
|
|
|
|
v-model:type="type"
|
|
|
|
|
:nextPage="nextPage"
|
|
|
|
|
:fecthlistappointment="fecthlistappointment"
|
|
|
|
|
/>
|
2024-05-17 16:37:55 +07:00
|
|
|
|
|
|
|
|
<DialogOrgSelectEmployee
|
|
|
|
|
:title="`เลือกหน่วยงานที่รับการปรับระดับชั้นงาน`"
|
|
|
|
|
v-model:modal="modalTree"
|
2024-05-17 17:20:50 +07:00
|
|
|
v-model:type="typeModal"
|
2024-05-17 16:37:55 +07:00
|
|
|
:posType="posType"
|
|
|
|
|
:posLevel="posLevel"
|
|
|
|
|
:position="position"
|
|
|
|
|
:dataRows="dataRows"
|
|
|
|
|
:onSubmit="onSave"
|
|
|
|
|
/>
|
2023-09-29 15:02:04 +07:00
|
|
|
</template>
|
|
|
|
|
<style scoped lang="scss"></style>
|