2023-11-02 17:32:57 +07:00
|
|
|
<script setup lang="ts">
|
2025-07-21 15:23:12 +07:00
|
|
|
import { ref, watch, reactive, onMounted } from "vue";
|
2023-11-02 17:32:57 +07:00
|
|
|
import { useQuasar } from "quasar";
|
2024-09-18 17:26:53 +07:00
|
|
|
|
2024-01-09 13:24:57 +07:00
|
|
|
import http from "@/plugins/http";
|
|
|
|
|
import config from "@/app.config";
|
2024-09-18 17:26:53 +07:00
|
|
|
import { useCounterMixin } from "@/stores/mixin";
|
|
|
|
|
import { useChangeRoundDataStore } from "@/modules/09_leave/stores/ChangeRoundStore";
|
|
|
|
|
import { checkPermission } from "@/utils/permissions";
|
2026-03-24 13:08:17 +07:00
|
|
|
import { useStructureTree } from "@/stores/structureTree";
|
|
|
|
|
import { useRoute } from "vue-router";
|
2023-11-10 14:58:49 +07:00
|
|
|
|
2024-11-25 13:18:11 +07:00
|
|
|
import type { DataPost } from "@/modules/09_leave/interface/request/changeRound";
|
2023-11-10 14:58:49 +07:00
|
|
|
|
2024-11-25 13:18:11 +07:00
|
|
|
import Dialogform from "@/modules/09_leave/components/03_ChangeRound/DialogForm.vue";
|
2023-11-10 14:58:49 +07:00
|
|
|
|
|
|
|
|
/** useStore */
|
2026-03-24 13:08:17 +07:00
|
|
|
const route = useRoute();
|
2023-11-03 17:54:28 +07:00
|
|
|
const mixin = useCounterMixin();
|
2026-03-24 13:08:17 +07:00
|
|
|
|
2024-01-09 13:24:57 +07:00
|
|
|
const {
|
|
|
|
|
showLoader,
|
|
|
|
|
hideLoader,
|
|
|
|
|
success,
|
|
|
|
|
messageError,
|
|
|
|
|
dialogMessageNotify,
|
|
|
|
|
dialogConfirm,
|
|
|
|
|
} = mixin;
|
2023-11-02 17:32:57 +07:00
|
|
|
const dataStore = useChangeRoundDataStore();
|
2026-03-24 13:08:17 +07:00
|
|
|
const { fetchStructureTree } = useStructureTree();
|
2023-11-10 14:58:49 +07:00
|
|
|
|
|
|
|
|
/** use */
|
|
|
|
|
const $q = useQuasar();
|
|
|
|
|
|
2023-11-02 17:32:57 +07:00
|
|
|
const modal = ref<boolean>(false);
|
2024-01-09 13:24:57 +07:00
|
|
|
const dateWork = ref<string>("NORMAL");
|
2023-12-20 15:48:07 +07:00
|
|
|
const modalFix = ref<boolean>(false);
|
2023-11-02 17:32:57 +07:00
|
|
|
const editCheck = ref<string>("");
|
|
|
|
|
const DataRow = ref<any>();
|
2024-11-25 13:18:11 +07:00
|
|
|
const formData = reactive<DataPost>({
|
2023-11-02 17:32:57 +07:00
|
|
|
cardId: "",
|
|
|
|
|
firstName: "",
|
|
|
|
|
lastName: "",
|
2024-06-24 15:57:23 +07:00
|
|
|
page: 1,
|
|
|
|
|
pageSize: 10,
|
2026-03-24 13:08:17 +07:00
|
|
|
selectedNodeId: null,
|
2026-03-24 17:30:10 +07:00
|
|
|
selectedNode: "",
|
2023-11-02 17:32:57 +07:00
|
|
|
});
|
|
|
|
|
|
2026-03-24 13:08:17 +07:00
|
|
|
/** โครงสร้างข้อมูลต้นไม้ขององค์กร **/
|
|
|
|
|
const nodeTree = ref<any[]>([]);
|
|
|
|
|
const expanded = ref<string[]>([]);
|
|
|
|
|
const orgTreeId = ref<string | null>(null);
|
|
|
|
|
const filter = ref<string>("");
|
|
|
|
|
const selected = ref<any[]>([]);
|
|
|
|
|
const isMultiple = ref<boolean>(false);
|
|
|
|
|
|
|
|
|
|
/** function fetch ข้อมูลของ Tree*/
|
|
|
|
|
async function fetchDataTree() {
|
|
|
|
|
nodeTree.value = await fetchStructureTree(route.meta.Key as string, true);
|
|
|
|
|
}
|
|
|
|
|
|
2023-11-10 14:58:49 +07:00
|
|
|
/**
|
|
|
|
|
* Function openPopup
|
|
|
|
|
* @param check action edit,history
|
|
|
|
|
* @param detail รายละเอียดข้อมูลรอบการปฏิบัติของผู้ใช้งาน
|
|
|
|
|
*/
|
2024-11-26 11:10:23 +07:00
|
|
|
async function Openmodal(check: string, detail: any) {
|
2023-11-02 17:32:57 +07:00
|
|
|
DataRow.value = detail;
|
|
|
|
|
modal.value = true;
|
2023-11-24 17:28:37 +07:00
|
|
|
dataStore.setProfileId(DataRow.value.profileId);
|
2023-11-02 17:32:57 +07:00
|
|
|
editCheck.value = check;
|
2023-11-28 14:03:31 +07:00
|
|
|
if (check === "history") {
|
|
|
|
|
modal.value = true;
|
2024-11-26 11:10:23 +07:00
|
|
|
dataStore.changePage(1, dataStore.pageSize);
|
|
|
|
|
// dataStore.fetchDatainHistory();
|
2023-11-28 14:03:31 +07:00
|
|
|
}
|
2023-11-02 17:32:57 +07:00
|
|
|
}
|
2023-11-06 10:57:49 +07:00
|
|
|
|
2024-01-10 11:04:27 +07:00
|
|
|
/**
|
|
|
|
|
* function เรียกข้อมูลปฏิทินวันทำงาน
|
|
|
|
|
* @param id profileId
|
|
|
|
|
*/
|
|
|
|
|
async function fetchDataCalendarWork(id: string) {
|
|
|
|
|
showLoader();
|
|
|
|
|
await http
|
|
|
|
|
.get(config.API.leaveWorkByid(id))
|
|
|
|
|
.then((res) => {
|
|
|
|
|
dateWork.value = res.data.result.work;
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
messageError($q, err);
|
|
|
|
|
})
|
|
|
|
|
.finally(() => {
|
|
|
|
|
hideLoader();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-09 13:24:57 +07:00
|
|
|
const detailByid = ref();
|
2024-01-10 11:04:27 +07:00
|
|
|
async function OpenmodalFix(detail: any) {
|
2024-01-09 13:24:57 +07:00
|
|
|
detailByid.value = detail;
|
2024-11-26 11:10:23 +07:00
|
|
|
modalFix.value = true;
|
|
|
|
|
await fetchDataCalendarWork(detail.profileId);
|
2023-12-20 15:48:07 +07:00
|
|
|
}
|
|
|
|
|
|
2023-11-10 14:58:49 +07:00
|
|
|
/** Function closePopup */
|
2023-11-02 17:32:57 +07:00
|
|
|
function closeDialog() {
|
|
|
|
|
modal.value = false;
|
2023-12-20 15:48:07 +07:00
|
|
|
modalFix.value = false;
|
2026-03-24 13:08:17 +07:00
|
|
|
isMultiple.value = false;
|
2023-11-02 17:32:57 +07:00
|
|
|
}
|
2023-11-06 10:57:49 +07:00
|
|
|
|
2024-06-24 15:57:23 +07:00
|
|
|
function save() {
|
2024-01-09 13:24:57 +07:00
|
|
|
dialogConfirm($q, async () => {
|
|
|
|
|
showLoader();
|
|
|
|
|
await http
|
2024-01-09 15:49:50 +07:00
|
|
|
.put(config.API.leaveWorkByid(detailByid.value.profileId), {
|
2024-01-09 13:24:57 +07:00
|
|
|
work: dateWork.value,
|
|
|
|
|
})
|
2024-11-26 11:10:23 +07:00
|
|
|
.then(async () => {
|
|
|
|
|
// await searchData();
|
2024-01-09 13:24:57 +07:00
|
|
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
2024-11-25 13:18:11 +07:00
|
|
|
closeDialog();
|
2024-01-09 13:24:57 +07:00
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
messageError($q, err);
|
|
|
|
|
})
|
|
|
|
|
.finally(() => {
|
2024-06-24 15:57:23 +07:00
|
|
|
hideLoader();
|
2024-01-09 13:24:57 +07:00
|
|
|
});
|
|
|
|
|
});
|
2023-12-21 09:14:19 +07:00
|
|
|
}
|
|
|
|
|
|
2024-06-24 15:57:23 +07:00
|
|
|
/**
|
|
|
|
|
* function updatePagination
|
|
|
|
|
* @param newPagination ข้อมูล Pagination ใหม่
|
|
|
|
|
*/
|
|
|
|
|
function updatePagination(newPagination: any) {
|
|
|
|
|
formData.pageSize = newPagination.rowsPerPage;
|
|
|
|
|
}
|
|
|
|
|
|
2023-11-10 14:58:49 +07:00
|
|
|
/** Function ค้นหาข้อมูล */
|
2024-11-26 11:10:23 +07:00
|
|
|
async function searchData() {
|
2026-03-24 13:08:17 +07:00
|
|
|
await dataStore.fetchDataForCardId(formData);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function onSelectedOrgTree(data: any) {
|
|
|
|
|
selected.value = [];
|
|
|
|
|
orgTreeId.value = data.orgTreeId;
|
2026-03-24 17:30:10 +07:00
|
|
|
formData.selectedNodeId = data.orgTreeDnaId;
|
|
|
|
|
formData.selectedNode = data.orgLevel;
|
2026-03-24 13:08:17 +07:00
|
|
|
formData.page = 1;
|
|
|
|
|
searchData();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function handleSelectMultiple() {
|
|
|
|
|
modal.value = true;
|
|
|
|
|
isMultiple.value = true;
|
|
|
|
|
editCheck.value = "edit";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function resetSelected() {
|
|
|
|
|
selected.value = [];
|
2023-11-02 17:32:57 +07:00
|
|
|
}
|
2024-09-18 17:26:53 +07:00
|
|
|
|
|
|
|
|
watch(
|
|
|
|
|
() => formData.pageSize,
|
|
|
|
|
() => {
|
2024-11-26 11:10:23 +07:00
|
|
|
formData.page = 1;
|
2024-09-18 17:26:53 +07:00
|
|
|
searchData();
|
|
|
|
|
}
|
|
|
|
|
);
|
2025-07-21 15:23:12 +07:00
|
|
|
|
|
|
|
|
onMounted(() => {
|
2026-03-24 13:08:17 +07:00
|
|
|
fetchDataTree();
|
2025-07-21 15:23:12 +07:00
|
|
|
dataStore.rows = [];
|
|
|
|
|
});
|
2023-11-02 17:32:57 +07:00
|
|
|
</script>
|
|
|
|
|
<template>
|
|
|
|
|
<div class="toptitle text-dark col-12 row items-center">
|
2025-07-11 14:36:53 +07:00
|
|
|
เปลี่ยนแปลงรอบการปฏิบัติงานของข้าราชการ
|
2023-11-02 17:32:57 +07:00
|
|
|
</div>
|
2026-03-24 13:08:17 +07:00
|
|
|
|
|
|
|
|
<q-card>
|
|
|
|
|
<q-card-section :horizontal="$q.screen.gt.xs">
|
|
|
|
|
<q-card-section class="col-lg-3 col-md-4 col-xs-12 q-gutter-sm">
|
|
|
|
|
<div>
|
|
|
|
|
<q-input dense outlined v-model="filter" label="ค้นหา">
|
|
|
|
|
<template v-slot:append>
|
|
|
|
|
<q-icon name="search" />
|
|
|
|
|
</template>
|
|
|
|
|
</q-input>
|
2023-11-02 17:32:57 +07:00
|
|
|
</div>
|
2026-03-24 13:08:17 +07:00
|
|
|
<div class="bg-white tree-container q-pa-xs">
|
|
|
|
|
<q-tree
|
|
|
|
|
class="q-pa-sm q-gutter-sm"
|
2023-11-02 17:32:57 +07:00
|
|
|
dense
|
2026-03-24 13:08:17 +07:00
|
|
|
:nodes="nodeTree"
|
|
|
|
|
node-key="orgTreeId"
|
|
|
|
|
label-key="labelName"
|
|
|
|
|
:filter="filter.trim()"
|
|
|
|
|
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
|
|
|
|
no-nodes-label="ไม่มีข้อมูล"
|
|
|
|
|
v-model:expanded="expanded"
|
2023-11-02 17:32:57 +07:00
|
|
|
>
|
2026-03-24 13:08:17 +07:00
|
|
|
<template v-slot:default-header="prop">
|
|
|
|
|
<q-item
|
|
|
|
|
clickable
|
|
|
|
|
:active="orgTreeId == prop.node.orgTreeId"
|
|
|
|
|
@click.stop="onSelectedOrgTree(prop.node)"
|
|
|
|
|
active-class="my-list-link text-primary text-weight-medium"
|
|
|
|
|
class="row col-12 text-dark items-center q-py-xs q-pl-sm rounded-borders my-list"
|
|
|
|
|
>
|
|
|
|
|
<div>
|
|
|
|
|
<div class="text-weight-medium">
|
|
|
|
|
{{ prop.node.orgTreeName }}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="text-weight-light text-grey-8">
|
|
|
|
|
{{ prop.node.orgCode == null ? null : prop.node.orgCode }}
|
|
|
|
|
{{
|
|
|
|
|
prop.node.orgTreeShortName == null
|
|
|
|
|
? null
|
|
|
|
|
: prop.node.orgTreeShortName
|
|
|
|
|
}}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</q-item>
|
|
|
|
|
</template>
|
|
|
|
|
</q-tree>
|
2023-11-02 17:32:57 +07:00
|
|
|
</div>
|
2026-03-24 13:08:17 +07:00
|
|
|
</q-card-section>
|
|
|
|
|
<q-separator :vertical="$q.screen.gt.xs" />
|
|
|
|
|
<q-card-section
|
|
|
|
|
class="col-lg-9 col-md-8 col-xs-12 q-gutter-sm scroll"
|
|
|
|
|
style="height: 80vh"
|
|
|
|
|
v-if="orgTreeId"
|
2023-11-03 17:54:28 +07:00
|
|
|
>
|
2026-03-24 13:08:17 +07:00
|
|
|
<div class="row col-xs-12 col-sm-9">
|
|
|
|
|
<q-card flat bordered class="bg-grey-2 col-12 bg-white q-pa-lg">
|
|
|
|
|
<div class="text-dark col-12 text-weight-bold text-subtitle1">
|
|
|
|
|
ค้นหารายชื่อ
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row justify-between q-gutter-y-sm">
|
|
|
|
|
<q-input
|
|
|
|
|
:readonly="!checkPermission($route)?.attrIsGet"
|
|
|
|
|
v-model="formData.cardId"
|
|
|
|
|
outlined
|
|
|
|
|
label="เลขประจำตัวประชาชน"
|
|
|
|
|
class="col-6 col-md-4 bg-white inputgreen"
|
|
|
|
|
dense
|
|
|
|
|
hide-bottom-space
|
|
|
|
|
maxlength="13"
|
|
|
|
|
/>
|
|
|
|
|
<q-input
|
|
|
|
|
:readonly="!checkPermission($route)?.attrIsGet"
|
|
|
|
|
v-model="formData.firstName"
|
|
|
|
|
outlined
|
|
|
|
|
label="ชื่อ"
|
|
|
|
|
class="col-5 col-md-3 bg-white inputgreen"
|
|
|
|
|
dense
|
|
|
|
|
hide-bottom-space
|
|
|
|
|
/>
|
|
|
|
|
<q-input
|
|
|
|
|
:readonly="!checkPermission($route)?.attrIsGet"
|
|
|
|
|
v-model="formData.lastName"
|
|
|
|
|
outlined
|
|
|
|
|
label="นามสกุล"
|
|
|
|
|
class="col-6 col-md-3 bg-white inputgreen"
|
|
|
|
|
dense
|
|
|
|
|
hide-bottom-space
|
|
|
|
|
/>
|
|
|
|
|
<q-btn
|
|
|
|
|
v-if="checkPermission($route)?.attrIsGet"
|
|
|
|
|
@click="(formData.page = 1), searchData()"
|
|
|
|
|
for="#search"
|
|
|
|
|
dense
|
|
|
|
|
unelevated
|
|
|
|
|
color="primary"
|
|
|
|
|
class="q-px-sm col-5 col-md-1"
|
|
|
|
|
style="max-height: 40px"
|
|
|
|
|
>ค้นหา</q-btn
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</q-card>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
v-if="dataStore.rows.length === 0 && dataStore.checkCilck === true"
|
|
|
|
|
>
|
|
|
|
|
<q-card
|
|
|
|
|
flat
|
|
|
|
|
bordered
|
|
|
|
|
class="bg-grey-2 col-12 q-pa-lg text-center text-subtitle1 text-bold"
|
|
|
|
|
>ไม่พบข้อมูล</q-card
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="dataStore.rows.length !== 0" class="col-12">
|
|
|
|
|
<div class="row justify-between items-center q-mb-sm">
|
|
|
|
|
<q-btn
|
|
|
|
|
v-show="selected.length > 0"
|
|
|
|
|
color="info"
|
|
|
|
|
dense
|
|
|
|
|
icon="mdi-shuffle-variant"
|
|
|
|
|
label="เปลี่ยนรอบการลงเวลา"
|
|
|
|
|
@click="handleSelectMultiple()"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<d-table
|
|
|
|
|
ref="table"
|
|
|
|
|
:columns="dataStore.columns"
|
|
|
|
|
:rows="dataStore.rows"
|
|
|
|
|
row-key="profileId"
|
|
|
|
|
flat
|
|
|
|
|
bordered
|
|
|
|
|
dense
|
|
|
|
|
class="custom-header-table"
|
|
|
|
|
:visible-columns="dataStore.visibleColumns"
|
|
|
|
|
:rows-per-page-options="[10, 25, 50, 100]"
|
|
|
|
|
@update:pagination="updatePagination"
|
|
|
|
|
selection="multiple"
|
|
|
|
|
v-model:selected="selected"
|
|
|
|
|
>
|
|
|
|
|
<template v-slot:header="props">
|
|
|
|
|
<q-tr :props="props">
|
|
|
|
|
<q-th auto-width>
|
|
|
|
|
<q-checkbox
|
|
|
|
|
keep-color
|
|
|
|
|
color="primary"
|
|
|
|
|
dense
|
|
|
|
|
v-model="props.selected"
|
|
|
|
|
/>
|
|
|
|
|
</q-th>
|
|
|
|
|
<q-th auto-width />
|
|
|
|
|
<q-th
|
|
|
|
|
v-for="col in props.cols"
|
|
|
|
|
:key="col.name"
|
|
|
|
|
:props="props"
|
|
|
|
|
style="color: #000000; font-weight: 500"
|
2023-11-02 17:32:57 +07:00
|
|
|
>
|
2026-03-24 13:08:17 +07:00
|
|
|
<span class="text-weight-medium">{{ col.label }}</span>
|
|
|
|
|
</q-th>
|
|
|
|
|
</q-tr>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:body="props">
|
|
|
|
|
<q-tr :props="props">
|
|
|
|
|
<q-td class="text-center">
|
|
|
|
|
<q-checkbox
|
|
|
|
|
keep-color
|
|
|
|
|
color="primary"
|
|
|
|
|
dense
|
|
|
|
|
v-model="props.selected"
|
|
|
|
|
/>
|
|
|
|
|
</q-td>
|
|
|
|
|
<q-td>
|
|
|
|
|
<div>
|
|
|
|
|
<q-btn
|
|
|
|
|
flat
|
|
|
|
|
icon="mdi-dots-horizontal-circle-outline"
|
|
|
|
|
color="secondary"
|
|
|
|
|
for="#cancel"
|
|
|
|
|
dense
|
|
|
|
|
round
|
|
|
|
|
>
|
|
|
|
|
<q-menu>
|
|
|
|
|
<q-list>
|
|
|
|
|
<q-item
|
|
|
|
|
v-if="checkPermission($route)?.attrIsUpdate"
|
|
|
|
|
clickable
|
|
|
|
|
v-close-popup
|
|
|
|
|
@click="Openmodal('edit', props.row)"
|
|
|
|
|
>
|
|
|
|
|
<q-item-section style="min-width: 0px" avatar>
|
|
|
|
|
<q-icon
|
|
|
|
|
color="primary"
|
|
|
|
|
name="mdi-shuffle-variant"
|
|
|
|
|
size="xs"
|
|
|
|
|
/>
|
|
|
|
|
</q-item-section>
|
2024-08-09 15:40:23 +07:00
|
|
|
|
2026-03-24 13:08:17 +07:00
|
|
|
<q-item-section>
|
|
|
|
|
<q-item-label>เปลี่ยนรอบการลงเวลา</q-item-label>
|
|
|
|
|
</q-item-section>
|
|
|
|
|
</q-item>
|
|
|
|
|
<q-item
|
|
|
|
|
v-if="checkPermission($route)?.attrIsUpdate"
|
|
|
|
|
clickable
|
|
|
|
|
v-close-popup
|
|
|
|
|
@click="OpenmodalFix(props.row)"
|
|
|
|
|
>
|
|
|
|
|
<q-item-section style="min-width: 0px" avatar>
|
|
|
|
|
<q-icon color="edit" name="edit" size="xs" />
|
|
|
|
|
</q-item-section>
|
2024-08-09 15:40:23 +07:00
|
|
|
|
2026-03-24 13:08:17 +07:00
|
|
|
<q-item-section>
|
|
|
|
|
<q-item-label>แก้ไขปฏิทินวันทำงาน</q-item-label>
|
|
|
|
|
</q-item-section>
|
|
|
|
|
</q-item>
|
|
|
|
|
<q-item
|
|
|
|
|
clickable
|
|
|
|
|
v-close-popup
|
|
|
|
|
@click="Openmodal('history', props.row)"
|
|
|
|
|
>
|
|
|
|
|
<q-item-section style="min-width: 0px" avatar>
|
|
|
|
|
<q-icon
|
|
|
|
|
color="deep-purple"
|
|
|
|
|
name="mdi-history"
|
|
|
|
|
size="xs"
|
|
|
|
|
/>
|
|
|
|
|
</q-item-section>
|
|
|
|
|
<q-item-section>
|
|
|
|
|
<q-item-label>ประวัติการเปลี่ยนรอบ</q-item-label>
|
|
|
|
|
</q-item-section>
|
|
|
|
|
</q-item>
|
|
|
|
|
</q-list>
|
|
|
|
|
</q-menu>
|
|
|
|
|
</q-btn>
|
|
|
|
|
</div>
|
|
|
|
|
</q-td>
|
|
|
|
|
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
|
|
|
|
<div>
|
|
|
|
|
{{ col.value ?? "-" }}
|
|
|
|
|
</div>
|
|
|
|
|
</q-td>
|
|
|
|
|
</q-tr>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:pagination="scope">
|
|
|
|
|
ทั้งหมด {{ dataStore.totalListMain }} รายการ
|
|
|
|
|
<q-pagination
|
|
|
|
|
v-model="formData.page"
|
|
|
|
|
active-color="primary"
|
|
|
|
|
color="dark"
|
|
|
|
|
:max="Number(dataStore.maxPageMain)"
|
|
|
|
|
size="sm"
|
|
|
|
|
boundary-links
|
|
|
|
|
direction-links
|
|
|
|
|
:max-pages="5"
|
|
|
|
|
@update:model-value="dataStore.fetchDataForCardId(formData)"
|
|
|
|
|
></q-pagination>
|
|
|
|
|
</template>
|
|
|
|
|
</d-table>
|
|
|
|
|
</div>
|
|
|
|
|
</q-card-section>
|
|
|
|
|
</q-card-section>
|
2023-11-02 17:32:57 +07:00
|
|
|
</q-card>
|
2023-12-21 09:14:19 +07:00
|
|
|
|
2024-01-09 13:24:57 +07:00
|
|
|
<!-- popup เปลี่ยนรอบการปฏิบัติงาน ,ประวัติการเปลี่ยนรอบการปฏิบัติงาน -->
|
2023-11-02 17:32:57 +07:00
|
|
|
<Dialogform
|
|
|
|
|
:modal="modal"
|
|
|
|
|
:closeDialog="closeDialog"
|
|
|
|
|
:editCheck="editCheck"
|
|
|
|
|
:DataRow="DataRow"
|
2023-11-24 17:28:37 +07:00
|
|
|
:personId="DataRow == null ? '' : DataRow.profileId"
|
2023-11-27 16:31:45 +07:00
|
|
|
@update:change-page="dataStore.changePage"
|
2026-03-24 13:08:17 +07:00
|
|
|
v-model:isMultiple="isMultiple"
|
|
|
|
|
:selectedMultiple="selected"
|
|
|
|
|
@update:selected="resetSelected"
|
2023-11-02 17:32:57 +07:00
|
|
|
/>
|
2024-01-09 13:24:57 +07:00
|
|
|
|
|
|
|
|
<!-- แก้ไขปฏิทินวันทำงาน -->
|
2023-12-20 15:48:07 +07:00
|
|
|
<q-dialog v-model="modalFix" persistent>
|
|
|
|
|
<q-card style="min-width: 800px"
|
|
|
|
|
><q-toolbar>
|
|
|
|
|
<q-toolbar-title class="text-subtitle1 text-bold">
|
|
|
|
|
{{ "แก้ไขปฏิทินวันทำงาน" }}
|
|
|
|
|
</q-toolbar-title>
|
|
|
|
|
<q-btn
|
|
|
|
|
icon="close"
|
|
|
|
|
unelevated
|
|
|
|
|
round
|
|
|
|
|
dense
|
|
|
|
|
@click="closeDialog"
|
|
|
|
|
style="color: #ff8080; background-color: #ffdede"
|
|
|
|
|
/>
|
|
|
|
|
</q-toolbar>
|
|
|
|
|
<q-separator color="grey-4" />
|
2023-12-21 09:14:19 +07:00
|
|
|
<q-form @submit="save" class="q-gutter-md">
|
2023-12-20 15:48:07 +07:00
|
|
|
<div class="q-pa-md">
|
|
|
|
|
<q-radio
|
|
|
|
|
name="dateWork"
|
|
|
|
|
v-model="dateWork"
|
2024-01-09 13:24:57 +07:00
|
|
|
val="NORMAL"
|
2023-12-20 15:48:07 +07:00
|
|
|
label="ทำงาน 5 วัน"
|
|
|
|
|
/>
|
|
|
|
|
<q-radio
|
|
|
|
|
name="dateWork"
|
|
|
|
|
v-model="dateWork"
|
2024-01-09 13:24:57 +07:00
|
|
|
val="6DAY"
|
2023-12-20 15:48:07 +07:00
|
|
|
label="ทำงาน 6 วัน"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<q-separator color="grey-4" />
|
|
|
|
|
<div class="q-pa-xs">
|
|
|
|
|
<div class="row justify-end q-mr-sm q-py-sm">
|
|
|
|
|
<q-btn
|
|
|
|
|
id="onSubmit"
|
|
|
|
|
type="submit"
|
|
|
|
|
unelevated
|
|
|
|
|
label="บันทึก"
|
|
|
|
|
class="q-px-md items-center"
|
|
|
|
|
color="secondary"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-12-21 09:14:19 +07:00
|
|
|
</q-form>
|
|
|
|
|
</q-card>
|
|
|
|
|
</q-dialog>
|
2023-11-02 17:32:57 +07:00
|
|
|
</template>
|
2023-12-21 09:14:19 +07:00
|
|
|
|
2023-11-02 17:32:57 +07:00
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.q-table tbody td:before.no-background {
|
|
|
|
|
background: none;
|
|
|
|
|
}
|
2026-03-24 13:08:17 +07:00
|
|
|
|
|
|
|
|
.tree-container {
|
|
|
|
|
overflow: auto;
|
|
|
|
|
height: 75vh;
|
|
|
|
|
border: 1px solid #e6e6e7;
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.my-list-link {
|
|
|
|
|
color: rgb(118, 168, 222);
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
background: #a3d3fb48 !important;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
border: 1px solid rgba(175, 185, 196, 0.217);
|
|
|
|
|
}
|
2023-11-02 17:32:57 +07:00
|
|
|
</style>
|