บรรจุ แต่งตั้ง ย้าย โอน => permission รายการรับโอน,รายการช่วยราชการ,รายการส่งตัวกลับ,รายการแต่งตั้ง-เลื่อน-ย้าย,ปรับระดับชั้นงาน-ย้ายลูกจ้าง,รายการอื่นๆ
This commit is contained in:
parent
71d2df7e63
commit
41a0d80b64
11 changed files with 248 additions and 531 deletions
|
|
@ -135,17 +135,17 @@ const createdAppoint = async () => {
|
|||
showLoader();
|
||||
await http
|
||||
.post(config.API.appointEmployeeOrder(Type), data)
|
||||
.then(() => {
|
||||
success($q, "บันทึกสำเร็จ");
|
||||
.then(async () => {
|
||||
await props.fecthlistappointment?.();
|
||||
await props.clickClose?.();
|
||||
await success($q, "บันทึกสำเร็จ");
|
||||
selected.value = [];
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
props.fecthlistappointment?.();
|
||||
selected.value = [];
|
||||
props.clickClose?.();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -162,23 +162,7 @@ watchEffect(() => {
|
|||
<q-separator />
|
||||
<q-card-section>
|
||||
<div class="row justify-between">
|
||||
<div class="col-5">
|
||||
<q-toolbar style="padding: 0">
|
||||
<!-- <q-select
|
||||
outlined
|
||||
dense
|
||||
:model-value="type"
|
||||
@update:model-value="updateInputType"
|
||||
:options="optionsType"
|
||||
label="คำสั่งแต่งตั่ง-เลื่อน-ย้าย"
|
||||
style="width: 400px; max-width: auto"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
/> -->
|
||||
</q-toolbar>
|
||||
</div>
|
||||
<div class="col-5"></div>
|
||||
<div class="col-5">
|
||||
<q-toolbar style="padding: 0">
|
||||
<q-input
|
||||
|
|
|
|||
|
|
@ -610,22 +610,22 @@ function onSave(data: any) {
|
|||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td
|
||||
auto-width
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsUpdate ||
|
||||
checkPermission($route)?.attrIsDelete
|
||||
"
|
||||
>
|
||||
<q-tr :props="props">
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="
|
||||
props.row.status !== 'REPORT' &&
|
||||
props.row.status !== 'DONE'
|
||||
(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
|
||||
"
|
||||
icon="mdi-dots-vertical"
|
||||
size="12px"
|
||||
color="grey-7"
|
||||
icon="mdi-dots-horizontal-circle-outline"
|
||||
color="secondary"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
|
|
@ -636,16 +636,17 @@ function onSave(data: any) {
|
|||
>
|
||||
<q-list dense style="min-width: 200px">
|
||||
<q-item
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsUpdate &&
|
||||
checkPermission($route)?.attrIsGet &&
|
||||
props.row.status !== 'REPORT' &&
|
||||
props.row.status !== 'DONE'
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="openModalTree(props.row, 'SLIP')"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-item-section style="min-width: 0px" avatar>
|
||||
<q-icon
|
||||
color="primary"
|
||||
size="xs"
|
||||
|
|
@ -657,16 +658,17 @@ function onSave(data: any) {
|
|||
>
|
||||
</q-item>
|
||||
<q-item
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsUpdate &&
|
||||
checkPermission($route)?.attrIsGet &&
|
||||
props.row.status !== 'REPORT' &&
|
||||
props.row.status !== 'DONE'
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="openModalTree(props.row, 'MOVE')"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-item-section style="min-width: 0px" avatar>
|
||||
<q-icon
|
||||
color="primary"
|
||||
size="xs"
|
||||
|
|
@ -677,18 +679,29 @@ function onSave(data: any) {
|
|||
>เลือกหน่วยงานที่รับย้าย</q-item-section
|
||||
>
|
||||
</q-item>
|
||||
|
||||
<q-item
|
||||
v-if="checkPermission($route)?.attrIsDelete"
|
||||
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>
|
||||
<q-item
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsUpdate &&
|
||||
props.row.status !== 'REPORT' &&
|
||||
props.row.status !== 'DONE'
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="clickDelete(props.row.id)"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||
<q-item-section style="min-width: 0px" avatar>
|
||||
<q-icon color="red" size="xs" name="mdi-delete" />
|
||||
</q-item-section>
|
||||
<q-item-section>ลบ</q-item-section>
|
||||
|
|
|
|||
|
|
@ -117,8 +117,8 @@ const columns2 = ref<QTableProps["columns"]>([
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
const pageNext = (item: object) => {
|
||||
props.nextPage?.(item);
|
||||
const pageNext = (item: any) => {
|
||||
props.nextPage?.(item?.id);
|
||||
};
|
||||
const emit = defineEmits([
|
||||
"update:filterKeyword2",
|
||||
|
|
@ -151,17 +151,17 @@ const sendToCommand = () => {
|
|||
showLoader();
|
||||
await http
|
||||
.put(config.API.apppointmentReport(Type), data)
|
||||
.then((res) => {
|
||||
success($q, "บันทึกสำเร็จ");
|
||||
.then(async () => {
|
||||
await props.fecthlistappointment?.();
|
||||
await props.clickClose?.();
|
||||
await success($q, "บันทึกสำเร็จ");
|
||||
selected.value = [];
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
props.fecthlistappointment?.();
|
||||
selected.value = [];
|
||||
props.clickClose?.();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
@ -179,23 +179,7 @@ watchEffect(() => {
|
|||
<q-separator />
|
||||
<q-card-section>
|
||||
<div class="row justify-between">
|
||||
<div class="col-5">
|
||||
<!-- <q-toolbar style="padding: 0">
|
||||
<q-select
|
||||
outlined
|
||||
dense
|
||||
:model-value="type"
|
||||
@update:model-value="updateInputType"
|
||||
:options="optionsType"
|
||||
label="คำสั่งแต่งตั่ง-เลื่อน-ย้าย"
|
||||
style="width: 400px; max-width: auto"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
/>
|
||||
</q-toolbar> -->
|
||||
</div>
|
||||
<div class="col-5"></div>
|
||||
<div class="col-5">
|
||||
<q-toolbar style="padding: 0">
|
||||
<q-input
|
||||
|
|
|
|||
|
|
@ -181,33 +181,6 @@ const fecthlistappointment = async () => {
|
|||
let response = res.data.result;
|
||||
listRecevice.value = response;
|
||||
rows.value = response;
|
||||
// rows.value = response.map((e: resData) => ({
|
||||
// personalId: e.id,
|
||||
// citizenId: e.citizenId,
|
||||
// fullname: e.prefix + e.firstname + " " + e.lastname,
|
||||
// organizationName:
|
||||
// e.organizationName +
|
||||
// " " +
|
||||
// e.organizationShortName +
|
||||
// " " +
|
||||
// e.positionNumber +
|
||||
// " " +
|
||||
// e.positionPath,
|
||||
// orgName: e.organizationName,
|
||||
// organizationShortName: e.organizationShortName,
|
||||
// positionNumber: e.positionNumber,
|
||||
// positionPath: e.positionPath,
|
||||
// status: statusText(e.status),
|
||||
// createdAt: date2Thai(e.createdAt),
|
||||
// birthday: e.dateOfBirth == null ? "-" : date2Thai(e.dateOfBirth),
|
||||
// educationOld: e.educationOld,
|
||||
// organizationPositionOld: e.organizationPositionOld,
|
||||
// positionTypeOld: e.positionTypeOld,
|
||||
// positionLevelOld: e.positionLevelOld,
|
||||
// positionNumberOld: e.positionNumberOld,
|
||||
// salary: e.salary,
|
||||
// positionDate: e.positionDate,
|
||||
// }));
|
||||
|
||||
rows2.value = rows.value.filter(
|
||||
(e: any) =>
|
||||
|
|
@ -231,24 +204,6 @@ const fecthlistappointment = async () => {
|
|||
});
|
||||
};
|
||||
|
||||
//ดึงข้อมูลประเภทคำสั่งเเต่งตั้ง
|
||||
// const fecthTypeOption = async () => {
|
||||
// type.value = "";
|
||||
// await http
|
||||
// .get(config.API.typeOrder())
|
||||
// .then((res) => {
|
||||
// optionsType.value = res.data.result.filter(
|
||||
// (e: OpType) =>
|
||||
// e.commandCode === "C-PM-05" ||
|
||||
// e.commandCode === "C-PM-06" ||
|
||||
// e.commandCode === "C-PM-07"
|
||||
// );
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// });
|
||||
// };
|
||||
|
||||
// เปิดโครงสร้าง
|
||||
const openModalTree = (data: any, type: string) => {
|
||||
personalId.value = data.id;
|
||||
|
|
@ -403,22 +358,22 @@ onMounted(() => {
|
|||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td
|
||||
auto-width
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsUpdate ||
|
||||
checkPermission($route)?.attrIsDelete
|
||||
"
|
||||
>
|
||||
<q-tr :props="props">
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="
|
||||
props.row.status !== 'REPORT' &&
|
||||
props.row.status !== 'DONE'
|
||||
(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
|
||||
"
|
||||
icon="mdi-dots-vertical"
|
||||
size="12px"
|
||||
color="grey-7"
|
||||
icon="mdi-dots-horizontal-circle-outline"
|
||||
color="secondary"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
|
|
@ -429,16 +384,17 @@ onMounted(() => {
|
|||
>
|
||||
<q-list dense style="min-width: 250px">
|
||||
<q-item
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsUpdate &&
|
||||
checkPermission($route)?.attrIsGet &&
|
||||
props.row.status !== 'REPORT' &&
|
||||
props.row.status !== 'DONE'
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="openModalTree(props.row, 'APPOINT')"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-item-section style="min-width: 0px" avatar>
|
||||
<q-icon
|
||||
color="primary"
|
||||
size="xs"
|
||||
|
|
@ -449,17 +405,19 @@ onMounted(() => {
|
|||
>เลือกหน่วยงานที่รับแต่งตั้ง</q-item-section
|
||||
>
|
||||
</q-item>
|
||||
|
||||
<q-item
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsUpdate &&
|
||||
checkPermission($route)?.attrIsGet &&
|
||||
props.row.status !== 'REPORT' &&
|
||||
props.row.status !== 'DONE'
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="openModalTree(props.row, 'SLIP')"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-item-section style="min-width: 0px" avatar>
|
||||
<q-icon
|
||||
color="primary"
|
||||
size="xs"
|
||||
|
|
@ -470,17 +428,19 @@ onMounted(() => {
|
|||
>เลือกหน่วยงานที่รับเลื่อน</q-item-section
|
||||
>
|
||||
</q-item>
|
||||
|
||||
<q-item
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsUpdate &&
|
||||
checkPermission($route)?.attrIsGet &&
|
||||
props.row.status !== 'REPORT' &&
|
||||
props.row.status !== 'DONE'
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="openModalTree(props.row, 'MOVE')"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-item-section style="min-width: 0px" avatar>
|
||||
<q-icon
|
||||
color="primary"
|
||||
size="xs"
|
||||
|
|
@ -491,18 +451,30 @@ onMounted(() => {
|
|||
>เลือกหน่วยงานที่รับย้าย</q-item-section
|
||||
>
|
||||
</q-item>
|
||||
|
||||
<q-item
|
||||
v-if="checkPermission($route)?.attrIsDelete"
|
||||
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>
|
||||
|
||||
<q-item
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsDelete &&
|
||||
props.row.status !== 'REPORT' &&
|
||||
props.row.status !== 'DONE'
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="clickDelete(props.row.id)"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||
<q-item-section style="min-width: 0px" avatar>
|
||||
<q-icon color="red" size="xs" name="mdi-delete" />
|
||||
</q-item-section>
|
||||
<q-item-section>ลบ</q-item-section>
|
||||
|
|
@ -511,14 +483,7 @@ onMounted(() => {
|
|||
</q-menu>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
@click="
|
||||
checkPermission($route)?.attrIsGet && nextPage(props.row.id)
|
||||
"
|
||||
>
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<div v-if="col.name == 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
|
|
@ -535,6 +500,7 @@ onMounted(() => {
|
|||
<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
|
||||
|
|
@ -542,6 +508,7 @@ onMounted(() => {
|
|||
: "-"
|
||||
}}
|
||||
</div>
|
||||
|
||||
<div v-else-if="col.name == 'organizationName'">
|
||||
<div class="col-4">
|
||||
<div class="text-weight-medium">
|
||||
|
|
@ -564,11 +531,13 @@ onMounted(() => {
|
|||
</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>
|
||||
|
|
@ -592,13 +561,6 @@ onMounted(() => {
|
|||
:fecthlistappointment="fecthlistappointment"
|
||||
/>
|
||||
|
||||
<!-- <DialogOrgTree
|
||||
v-model:modal="modalTree"
|
||||
:close="closeModalTree"
|
||||
:personal="personal"
|
||||
:personalId="personalId"
|
||||
/> -->
|
||||
|
||||
<DialogOrgSelect
|
||||
:title="`เลือกหน่วยงานที่แต่งตั้ง - เลื่อน - ย้าย`"
|
||||
v-model:modal="modalTree"
|
||||
|
|
|
|||
|
|
@ -307,30 +307,37 @@ onMounted(() => {
|
|||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td auto-width v-if="checkPermission($route)?.attrIsDelete">
|
||||
<q-tr :props="props">
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="mdi-eye"
|
||||
color="info"
|
||||
@click.stop.prevent="nextPage(props.row.id)"
|
||||
>
|
||||
<q-tooltip>รายละเอียด</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
color=" red-7"
|
||||
v-if="
|
||||
props.row.status !== 'REPORT' &&
|
||||
props.row.status !== 'DONE'
|
||||
props.row.status !== 'DONE' &&
|
||||
checkPermission($route)?.attrIsDelete
|
||||
"
|
||||
flat
|
||||
round
|
||||
class="text-red-14"
|
||||
icon="mdi-delete"
|
||||
dense
|
||||
color="red"
|
||||
icon="mdi-delete"
|
||||
@click.stop="clickDelete(props.row.id)"
|
||||
><q-tooltip>ลบข้อมูล</q-tooltip></q-btn
|
||||
>
|
||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td
|
||||
v-for="col in props.cols"
|
||||
:key="col.id"
|
||||
@click.stop.prevent="
|
||||
checkPermission($route)?.attrIsGet && nextPage(props.row.id)
|
||||
"
|
||||
>
|
||||
<q-td v-for="col in props.cols" :key="col.id">
|
||||
<div v-if="col.name === 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, computed, onMounted } from "vue";
|
||||
import { ref, onMounted } from "vue";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
|
@ -194,46 +194,6 @@ const fecthlistRecevice = async () => {
|
|||
const response = res.data.result;
|
||||
|
||||
listRecevice.value = response;
|
||||
|
||||
// response.map((e: ResponseData) => {
|
||||
// list.push({
|
||||
// personalId: e.id ?? "",
|
||||
// citizenId: e.citizenId ?? "-",
|
||||
// fullname: e.prefix + e.firstname + " " + e.lastname,
|
||||
// organizationName:
|
||||
// e.organizationName +
|
||||
// " " +
|
||||
// e.organizationShortName +
|
||||
// " " +
|
||||
// e.positionNumber +
|
||||
// " " +
|
||||
// e.positionPath,
|
||||
// orgName: e.organizationName,
|
||||
// organizationShortName: e.organizationShortName,
|
||||
// positionNumber: e.positionNumber,
|
||||
// positionPath: e.positionPath,
|
||||
// positionLevelId: e.positionLevelId,
|
||||
// positionTypeId: e.positionTypeId,
|
||||
// positionId: e.positionId,
|
||||
// birthday:
|
||||
// e.dateOfBirth == null
|
||||
// ? "-"
|
||||
// : date2Thai(e.dateOfBirth) &&
|
||||
// e.dateOfBirth.toString() === "0001-01-01T00:00:00"
|
||||
// ? "-"
|
||||
// : date2Thai(e.dateOfBirth),
|
||||
// status: e.status,
|
||||
// statusText: statusText(e.status ?? ""),
|
||||
// createdAt: e.createdAt !== null ? new Date(e.createdAt) : null,
|
||||
// dateText: e.createdAt !== null ? date2Thai(e.createdAt) : "-",
|
||||
// educationOld: e.educationOld ?? "",
|
||||
// organizationPositionOld: e.organizationPositionOld ?? "",
|
||||
// positionTypeOld: e.positionTypeOld,
|
||||
// positionLevelOld: e.positionLevelOld,
|
||||
// positionNumberOld: e.positionNumberOld,
|
||||
// amountOld: e.amountOld,
|
||||
// });
|
||||
// });
|
||||
rows.value = response;
|
||||
filters.value = response;
|
||||
})
|
||||
|
|
@ -441,22 +401,18 @@ onMounted(() => {
|
|||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-tr :props="props">
|
||||
<q-td
|
||||
auto-width
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsUpdate ||
|
||||
checkPermission($route)?.attrIsDelete
|
||||
checkPermission($route)?.attrIsDelete ||
|
||||
checkPermission($route)?.attrIsGet
|
||||
"
|
||||
>
|
||||
<q-btn
|
||||
v-if="
|
||||
props.row.status !== 'REPORT' &&
|
||||
props.row.status !== 'DONE'
|
||||
"
|
||||
icon="mdi-dots-vertical"
|
||||
size="12px"
|
||||
color="grey-7"
|
||||
icon="mdi-dots-horizontal-circle-outline"
|
||||
color="secondary"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
|
|
@ -467,85 +423,69 @@ onMounted(() => {
|
|||
>
|
||||
<q-list dense style="min-width: 100px">
|
||||
<q-item
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
v-if="
|
||||
props.row.status !== 'REPORT' &&
|
||||
props.row.status !== 'DONE' &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="openModalTree(props.row.id, props.row)"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-item-section style="min-width: 0px" avatar>
|
||||
<q-icon
|
||||
:color="
|
||||
props.row.status == 'REPORT' ||
|
||||
props.row.status == 'DONE'
|
||||
? 'grey'
|
||||
: 'primary'
|
||||
"
|
||||
color="primary"
|
||||
size="xs"
|
||||
name="mdi-bookmark-outline"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section
|
||||
>เลือกหน่วยงานที่รับโอน</q-item-section
|
||||
>
|
||||
>เลือกหน่วยงานที่รับโอน
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-item
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsUpdate &&
|
||||
props.row.status !== 'REPORT' &&
|
||||
props.row.status !== 'DONE'
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="openUpload(props.row.id)"
|
||||
:disable="
|
||||
props.row.status == 'REPORT' ||
|
||||
props.row.status == 'DONE'
|
||||
"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-icon
|
||||
size="xs"
|
||||
name="attach_file"
|
||||
:color="
|
||||
props.row.status == 'REPORT' ||
|
||||
props.row.status == 'DONE'
|
||||
? 'grey'
|
||||
: 'blue'
|
||||
"
|
||||
/>
|
||||
<q-item-section style="min-width: 0px" avatar>
|
||||
<q-icon size="xs" name="attach_file" color="blue" />
|
||||
</q-item-section>
|
||||
<q-item-section>อัปโหลดเอกสาร</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-item
|
||||
v-if="checkPermission($route)?.attrIsDelete"
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="nextPage(props.row.id)"
|
||||
>
|
||||
<q-item-section style="min-width: 0px" avatar>
|
||||
<q-tooltip>รายละเอียด</q-tooltip>
|
||||
<q-icon color="info" size="xs" name="mdi-eye" />
|
||||
</q-item-section>
|
||||
<q-item-section>รายละเอียด</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-item
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsDelete &&
|
||||
props.row.status !== 'REPORT' &&
|
||||
props.row.status !== 'DONE'
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="openDelete(props.row.id)"
|
||||
:disable="
|
||||
props.row.status == 'REPORT' ||
|
||||
props.row.status == 'DONE'
|
||||
"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-item-section style="min-width: 0px" avatar>
|
||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||
<q-icon
|
||||
:color="
|
||||
props.row.status == 'REPORT' ||
|
||||
props.row.status == 'DONE'
|
||||
? 'grey'
|
||||
: 'red'
|
||||
"
|
||||
size="xs"
|
||||
name="mdi-delete"
|
||||
/>
|
||||
<q-icon color="red" size="xs" name="mdi-delete" />
|
||||
</q-item-section>
|
||||
<q-item-section>ลบ</q-item-section>
|
||||
</q-item>
|
||||
|
|
@ -553,14 +493,7 @@ onMounted(() => {
|
|||
</q-menu>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
@click="
|
||||
checkPermission($route)?.attrIsGet && nextPage(props.row.id)
|
||||
"
|
||||
>
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<div v-if="col.name == 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
|
|
@ -615,196 +548,6 @@ onMounted(() => {
|
|||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
<!-- <q-tr :props="props" class="cursor-pointer">
|
||||
<q-td
|
||||
key="no"
|
||||
:props="props"
|
||||
@click="nextPage(props.row.personalId)"
|
||||
>
|
||||
{{ props.rowIndex + 1 }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="citizenId"
|
||||
:props="props"
|
||||
@click="nextPage(props.row.personalId)"
|
||||
>
|
||||
{{ props.row.citizenId }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="fullname"
|
||||
:props="props"
|
||||
@click="nextPage(props.row.personalId)"
|
||||
>
|
||||
{{ props.row.fullname }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="organizationName"
|
||||
:props="props"
|
||||
@click="nextPage(props.row.personalId)"
|
||||
>
|
||||
<div
|
||||
v-if="
|
||||
props.row.orgName !== null ||
|
||||
props.row.positionPath !== null
|
||||
"
|
||||
>
|
||||
<div class="col-4">
|
||||
<div class="text-weight-medium">
|
||||
{{
|
||||
props.row.orgName !== null ? props.row.orgName : "-"
|
||||
}}
|
||||
{{
|
||||
props.row.organizationShortName !== null
|
||||
? `(${props.row.organizationShortName})`
|
||||
: ""
|
||||
}}
|
||||
</div>
|
||||
<div class="text-weight-light">
|
||||
{{
|
||||
props.row.positionPath !== null
|
||||
? props.row.positionPath
|
||||
: "-"
|
||||
}}
|
||||
{{
|
||||
props.row.positionNumber !== null
|
||||
? `(${props.row.positionNumber})`
|
||||
: ""
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="col-4">
|
||||
<div class="text-weight-medium">-</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td
|
||||
key="birthday"
|
||||
:props="props"
|
||||
@click="nextPage(props.row.personalId)"
|
||||
>
|
||||
{{ props.row.birthday }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="dateText"
|
||||
:props="props"
|
||||
@click="nextPage(props.row.personalId)"
|
||||
>
|
||||
{{ props.row.dateText }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="statusText"
|
||||
:props="props"
|
||||
@click="nextPage(props.row.personalId)"
|
||||
>
|
||||
{{ props.row.statusText }}
|
||||
</q-td>
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
icon="mdi-dots-vertical"
|
||||
size="12px"
|
||||
color="grey-7"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
>
|
||||
<q-menu
|
||||
transition-show="jump-down"
|
||||
transition-hide="jump-up"
|
||||
>
|
||||
<q-list dense style="min-width: 100px">
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
openModalTree(props.row.personalId, props.row)
|
||||
"
|
||||
:disable="
|
||||
props.row.status == 'REPORT' ||
|
||||
props.row.status == 'DONE'
|
||||
"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-icon
|
||||
:color="
|
||||
props.row.status == 'REPORT' ||
|
||||
props.row.status == 'DONE'
|
||||
? 'grey'
|
||||
: 'primary'
|
||||
"
|
||||
size="xs"
|
||||
name="mdi-bookmark-outline"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section
|
||||
>เลือกหน่วยงานที่รับโอน</q-item-section
|
||||
>
|
||||
</q-item>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="openUpload(props.row.personalId)"
|
||||
:disable="
|
||||
props.row.status == 'REPORT' ||
|
||||
props.row.status == 'DONE'
|
||||
"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-icon
|
||||
size="xs"
|
||||
name="attach_file"
|
||||
:color="
|
||||
props.row.status == 'REPORT' ||
|
||||
props.row.status == 'DONE'
|
||||
? 'grey'
|
||||
: 'blue'
|
||||
"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>อัปโหลดเอกสาร</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="openDelete(props.row.personalId)"
|
||||
:disable="
|
||||
props.row.status == 'REPORT' ||
|
||||
props.row.status == 'DONE'
|
||||
"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||
<q-icon
|
||||
:color="
|
||||
props.row.status == 'REPORT' ||
|
||||
props.row.status == 'DONE'
|
||||
? 'grey'
|
||||
: '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>
|
||||
</q-tr> -->
|
||||
</template>
|
||||
</d-table>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -293,8 +293,19 @@ onMounted(async () => {
|
|||
</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="checkPermission($route)?.attrIsGet"
|
||||
flat
|
||||
dense
|
||||
round
|
||||
color="info"
|
||||
icon="mdi-eye"
|
||||
@click.stop.prevent="openDetail(props.row.id)"
|
||||
>
|
||||
<q-tooltip>รายละเอียด</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
v-if="
|
||||
props.row.status !== 'REPORT' &&
|
||||
|
|
@ -302,24 +313,18 @@ onMounted(async () => {
|
|||
checkPermission($route)?.attrIsDelete
|
||||
"
|
||||
icon="delete"
|
||||
size="14px"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="red-7"
|
||||
@click="clickDelete(props.row.fullname, props.row.id)"
|
||||
color="red"
|
||||
@click.stop.prevent="
|
||||
clickDelete(props.row.fullname, props.row.id)
|
||||
"
|
||||
>
|
||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td
|
||||
v-for="col in props.cols"
|
||||
:key="col.id"
|
||||
@click.stop.prevent="
|
||||
checkPermission($route)?.attrIsGet &&
|
||||
openDetail(props.row.id)
|
||||
"
|
||||
>
|
||||
<q-td v-for="col in props.cols" :key="col.id">
|
||||
<div v-if="col.name === 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -187,7 +187,6 @@ onMounted(async () => {
|
|||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
@click="openModalOrder"
|
||||
size="14px"
|
||||
flat
|
||||
round
|
||||
color="add"
|
||||
|
|
@ -245,22 +244,30 @@ onMounted(async () => {
|
|||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th auto-width />
|
||||
<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"
|
||||
class="cursor-pointer"
|
||||
@click="
|
||||
checkPermission($route)?.attrIsGet &&
|
||||
<q-tr :props="props">
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
flat
|
||||
dense
|
||||
round
|
||||
color="info"
|
||||
icon="mdi-eye"
|
||||
@click.stop.prevent="
|
||||
router.push(`/placement/transfer/${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>
|
||||
|
|
|
|||
|
|
@ -315,8 +315,20 @@ onMounted(async () => {
|
|||
</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="checkPermission($route)?.attrIsGet"
|
||||
flat
|
||||
dense
|
||||
round
|
||||
color="info"
|
||||
icon="mdi-eye"
|
||||
@click.stop.prevent="openDetail(props.row.id)"
|
||||
>
|
||||
<q-tooltip>รายละเอียด</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-if="
|
||||
props.row.status !== 'REPORT' &&
|
||||
|
|
@ -324,24 +336,16 @@ onMounted(async () => {
|
|||
checkPermission($route)?.attrIsDelete
|
||||
"
|
||||
icon="delete"
|
||||
size="14px"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="red-7"
|
||||
@click="clickDelete(props.row.id)"
|
||||
color="red"
|
||||
@click.stop.prevent="clickDelete(props.row.id)"
|
||||
>
|
||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td
|
||||
v-for="col in props.cols"
|
||||
:key="col.id"
|
||||
@click.stop.prevent="
|
||||
checkPermission($route)?.attrIsGet &&
|
||||
openDetail(props.row.id)
|
||||
"
|
||||
>
|
||||
<q-td v-for="col in props.cols" :key="col.id">
|
||||
<div v-if="col.name === 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ interface DataOption {
|
|||
disable?: boolean;
|
||||
}
|
||||
interface ListDataText {
|
||||
value:string
|
||||
label:string
|
||||
value: string;
|
||||
label: string;
|
||||
}
|
||||
|
||||
interface DataOption1 {
|
||||
|
|
@ -276,6 +276,13 @@ interface tableType {
|
|||
salary: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
interface ListMenu {
|
||||
label: string;
|
||||
icon: string;
|
||||
type: string;
|
||||
color: string;
|
||||
}
|
||||
export type {
|
||||
DataOption,
|
||||
DataOptionInsignia,
|
||||
|
|
@ -298,7 +305,8 @@ export type {
|
|||
AddressData,
|
||||
DataProfile,
|
||||
tableType,
|
||||
ListDataText
|
||||
ListDataText,
|
||||
ListMenu,
|
||||
};
|
||||
|
||||
export { AddressDataDefualt, FamilyDataDefualt };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue