Compare commits
98 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
926c47f273 | ||
|
|
d6e75d6966 | ||
|
|
170568384d | ||
|
|
7f25ed4ef1 | ||
|
|
8a0a6ea873 | ||
| 833718d276 | |||
| 73335d7dd5 | |||
|
|
07659ecc6c | ||
|
|
9d9cd92d6b | ||
|
|
40ebaa646f | ||
|
|
c700cf0abd | ||
|
|
b0b834cb9b | ||
|
|
0d5cb36fb2 | ||
|
|
cf468e14cb | ||
|
|
c21cfa838f | ||
|
|
376fba6059 | ||
|
|
3f5a4783c1 | ||
|
|
1de7a11721 | ||
|
|
b233b424d3 | ||
|
|
7da397a1fe | ||
|
|
c8a8321014 | ||
|
|
e11d9b18dc | ||
|
|
006c2bc0ba | ||
|
|
f408889000 | ||
|
|
f5e1c0eca6 | ||
|
|
ae495a90e1 | ||
|
|
26977319ed | ||
|
|
e6921f4166 | ||
|
|
f403813099 | ||
|
|
5641a14cb7 | ||
|
|
503d111634 | ||
|
|
fe30d01330 | ||
|
|
17c05d60d7 | ||
|
|
546942f8fb | ||
|
|
f12d999bbc | ||
|
|
a6018507c9 | ||
|
|
9275ef6bfe | ||
|
|
514de15f09 | ||
|
|
0303046e7a | ||
|
|
e9bcebee6d | ||
|
|
c00b6f89fe | ||
|
|
70d2c59f65 | ||
|
|
f1e8bc0997 | ||
|
|
abce475de0 | ||
|
|
b1ae19afa7 | ||
|
|
e151217c72 | ||
|
|
24c307e076 | ||
|
|
689c29ada4 | ||
|
|
db4df70a83 | ||
|
|
c7accb6044 | ||
|
|
dd5b2e0676 | ||
|
|
3c15bb3b0b | ||
|
|
4cfcd48a20 | ||
|
|
26ae535b15 | ||
|
|
ec5f113922 | ||
| 514f2c548d | |||
| 6967d90c25 | |||
| 1d9086fe7f | |||
| bebf684069 | |||
|
|
faec83aacc | ||
|
|
beef941dfd | ||
|
|
b26be66f89 | ||
|
|
b9059c486e | ||
|
|
5830d24118 | ||
|
|
263e122b60 | ||
| 069a221b29 | |||
| 30b63f1b52 | |||
|
|
c066ee577a | ||
|
|
59c188a3a9 | ||
|
|
2b0d3340ee | ||
| 3afa3ce3e4 | |||
| d6c57c5680 | |||
|
|
140553666d | ||
| d087fea744 | |||
| 31cb5827e1 | |||
| 5f48063ae7 | |||
|
|
e9c545a18d | ||
|
|
8359d1fbca | ||
|
|
c6ea0527c7 | ||
|
|
0a5f64c17c | ||
|
|
6f495cca9d | ||
|
|
b70d9948c0 | ||
|
|
ecc10e16c9 | ||
|
|
f899f05527 | ||
|
|
8d4f7bc077 | ||
|
|
1d99705b65 | ||
|
|
eeaa9bfff2 | ||
|
|
7471836167 | ||
|
|
52cfa6e0af | ||
| 3856eb8489 | |||
| 5ad9010654 | |||
| c7a784adc5 | |||
|
|
d7ea297e61 | ||
|
|
b0b6eada67 | ||
|
|
6ef832d84b | ||
| e2b50bdb22 | |||
| ae47c7cf34 | |||
| f1a2c753bb |
63 changed files with 2507 additions and 429 deletions
|
|
@ -27,6 +27,7 @@ export default {
|
|||
placementDefermentInfo: (id: string) => `${placement}/pass/deferment/${id}`,
|
||||
placementDisclaimInfo: (id: string) => `${placement}/pass/disclaim/${id}`,
|
||||
placementUpdatePass: `${placement}/pass/update-status`,
|
||||
placementUpdateDraftStatus: `${placement}/update/draft-status`,
|
||||
|
||||
//personal
|
||||
placementPersonalId: (personalId: string) =>
|
||||
|
|
|
|||
|
|
@ -61,4 +61,6 @@ export default {
|
|||
|
||||
leaveReportAPI: (type: string) =>
|
||||
`${leave}/report/download/time-records/${type}`,
|
||||
|
||||
leaveTask: `${leave}/admin/leave-task/process`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -272,4 +272,10 @@ export default {
|
|||
profileAssistanceReturn: `${env.API_URI}/placement/repatriation`,
|
||||
profileAssistanceUpdateDelete: (type: string) =>
|
||||
`${registryNew}${type}/assistance/update-delete/`,
|
||||
|
||||
profileAbsentLate: (type: string) => `${registryNew}${type}/absent-late`,
|
||||
profileAbsentLateUpdateDelete: (type: string) => `${registryNew}${type}/absent-late/update-delete`,
|
||||
profileAbsentLateHistory: (id: string, type: string) =>
|
||||
`${registryNew}${type}/absent-late/history/${id}`,
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ watch(
|
|||
outlined
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
@update:model-value="rows = []"
|
||||
@update:model-value="(rows = []), (selected = [])"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
import FooterContact from "@/components/FooterContact.vue";
|
||||
|
||||
const $q = useQuasar();
|
||||
const store = usePositionKeycloakStore();
|
||||
|
|
@ -391,7 +392,11 @@ function onClose() {
|
|||
</q-card-section>
|
||||
|
||||
<q-separator />
|
||||
<q-card-actions align="right">
|
||||
<q-card-actions class="q-px-sm items-center">
|
||||
<div class="row items-center q-pa-sm">
|
||||
<FooterContact />
|
||||
</div>
|
||||
<q-space />
|
||||
<q-btn
|
||||
type="submit"
|
||||
for="#submitForm"
|
||||
|
|
|
|||
17
src/components/FooterContact.vue
Normal file
17
src/components/FooterContact.vue
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<template>
|
||||
<div class="row items-center justify-center q-gutter-sm">
|
||||
<q-icon name="support_agent" color="primary" size="sm" />
|
||||
<span class="text-body2">
|
||||
พบปัญหาการใช้งานกรุณาติดต่อผู้ดูแลระบบ
|
||||
<span class="text-weight-medium text-primary"
|
||||
><a href="tel:0882649800" style="text-decoration: none; color: inherit"
|
||||
>088-264-9800</a
|
||||
>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -403,16 +403,6 @@ function clearFilter() {
|
|||
</div>
|
||||
</div>
|
||||
</q-form>
|
||||
|
||||
<div class="q-pa-sm q-gutter-sm">
|
||||
<q-card flat bordered class="col-12">
|
||||
<div class="row q-col-gutter-sm q-pa-sm">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<q-space />
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format(val, row) {
|
||||
return `${row.year + 543}`;
|
||||
return `${row.year ? row.year + 543 : "-"}`;
|
||||
},
|
||||
sort: (a: number, b: number) => b - a,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -400,7 +400,7 @@ async function checkSave() {
|
|||
|
||||
// เช็ค validation form ตำแหน่ง
|
||||
const isPositionFormValid = await myFormPosition.value?.validate();
|
||||
if (!isPositionFormValid) return;
|
||||
if (!isPositionFormValid && announcementExam.value) return;
|
||||
|
||||
// เช็คการเพิ่มตำแหน่ง
|
||||
if (announcementExam.value && rowsPosition.value.length === 0) {
|
||||
|
|
@ -889,7 +889,7 @@ function fetchPosition(level: number) {
|
|||
* @param val ค่าประเภทตำแหน่ง 0 = ประเภททั่วไป ,1 = ประเภทวิชาการ
|
||||
* @param index ตำแหน่งของข้อมูล
|
||||
*/
|
||||
function onUpdateHighDegree(val: string, index: string) {
|
||||
function onUpdateHighDegree(val: string, index: number) {
|
||||
rowsPosition.value[index].position = null;
|
||||
rowsPosition.value[index].level =
|
||||
val === "0" ? optionPosLevel1.value[0] : optionPosLevel2.value[0];
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ const baseColumns = ref<QTableColumn[]>([
|
|||
field: "year",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format: (v) => v + 543,
|
||||
format: (v) => (v ? v + 543 : "-"),
|
||||
sort: (a: string, b: string) =>
|
||||
a
|
||||
.toString()
|
||||
|
|
@ -920,9 +920,11 @@ onMounted(async () => {
|
|||
:locale="'th'"
|
||||
:enableTimePicker="false"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year="{ year }">{{
|
||||
year ? year + 543 : "-"
|
||||
}}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
value ? parseInt(value + 543) : "-"
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
|
|
@ -930,7 +932,7 @@ onMounted(async () => {
|
|||
outlined
|
||||
hide-bottom-space
|
||||
class="inputgreen"
|
||||
:model-value="insigniaForm.year !== 0 ? (insigniaForm.year as number) + 543 : null"
|
||||
:model-value="insigniaForm.year != null && insigniaForm.year !== 0 ? (insigniaForm.year as number) + 543 : null"
|
||||
:rules="[
|
||||
(val:string) =>
|
||||
!!val ||
|
||||
|
|
|
|||
|
|
@ -202,6 +202,17 @@ const pagination = ref({
|
|||
const columnsHistory = ref<QTableColumn[]>(baseColumns.value);
|
||||
const visibleColumnsHistory = ref<string[]>(baseVisibleColumns.value);
|
||||
|
||||
/** รายการประเภทการลาของ ลาไปศึกษา ฝึกอบรม ปฎิบัติการวิจัย หรือดูงาน*/
|
||||
const leaveSubTypeName = ref<string>("");
|
||||
const optionSubTypeName = ref<string[]>([
|
||||
"ศึกษาต่อ",
|
||||
"ฝึกอบรม",
|
||||
"ปฎิบัติการวิจัย",
|
||||
"ดูงาน",
|
||||
]);
|
||||
|
||||
const coupleDayLevelCountry = ref<string>("");
|
||||
|
||||
/** function fetch ข้อมูลรายการลา*/
|
||||
async function getData() {
|
||||
showLoader();
|
||||
|
|
@ -213,6 +224,7 @@ async function getData() {
|
|||
...item,
|
||||
id: item.id,
|
||||
typeLeave: item.leaveType.name,
|
||||
codeLeave: item.leaveType.code,
|
||||
code: item.leaveType.refCommandDate,
|
||||
dateStartLeave: item.dateLeaveStart,
|
||||
dateEndLeave: item.dateLeaveEnd,
|
||||
|
|
@ -292,8 +304,10 @@ function openDialogEdit(props: DetailData) {
|
|||
typeLeave.value = {
|
||||
id: props.typeLeaveId,
|
||||
name: props.typeLeave,
|
||||
code: props.code,
|
||||
code: props.codeLeave,
|
||||
};
|
||||
leaveSubTypeName.value = props.leaveSubTypeName;
|
||||
coupleDayLevelCountry.value = props.coupleDayLevelCountry;
|
||||
statLeave.value = props.status;
|
||||
reason.value = props.reason;
|
||||
dateRange.value = [
|
||||
|
|
@ -316,6 +330,10 @@ function onSubmit() {
|
|||
|
||||
const body = {
|
||||
leaveTypeId: typeLeave.value?.id,
|
||||
leaveSubTypeName:
|
||||
typeLeave.value?.code === "LV-008" ? leaveSubTypeName.value : undefined,
|
||||
coupleDayLevelCountry:
|
||||
typeLeave.value?.code === "LV-010" ? coupleDayLevelCountry.value : undefined,
|
||||
dateLeaveStart: dateToISO(dateRange.value[0]),
|
||||
dateLeaveEnd: dateToISO(dateRange.value[1]),
|
||||
leaveDays: numLeave.value,
|
||||
|
|
@ -451,6 +469,8 @@ function closeDialog() {
|
|||
dateRange.value = [new Date(), new Date()];
|
||||
numLeave.value = 1;
|
||||
numUsedLeave.value = 0;
|
||||
leaveSubTypeName.value = "";
|
||||
coupleDayLevelCountry.value = "";
|
||||
}
|
||||
|
||||
function statusLeave(val: string) {
|
||||
|
|
@ -741,6 +761,43 @@ onMounted(() => {
|
|||
) "
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="col-xs-6 col-sm-6 col-md-6"
|
||||
v-if="
|
||||
typeLeave?.code === 'LV-008' || typeLeave?.code === 'LV-010'
|
||||
"
|
||||
>
|
||||
<q-select
|
||||
v-if="typeLeave?.code === 'LV-008'"
|
||||
ref="typeLeaveRef"
|
||||
class="full-width inputgreen cursor-pointer"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
:label="`${'ประเภท'}`"
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกประเภท'}`]"
|
||||
v-model="leaveSubTypeName"
|
||||
:options="optionSubTypeName"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
emit-value
|
||||
map-options
|
||||
hide-bottom-space
|
||||
/>
|
||||
<q-input
|
||||
v-if="typeLeave?.code === 'LV-010'"
|
||||
ref="numLeaveRef"
|
||||
class="full-width inputgreen cursor-pointer"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="coupleDayLevelCountry"
|
||||
:rules="[(val:string) => !!val || `${'กรุณากรอกประเทศที่ลาติดตามคู่สมรส'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'ประเทศที่ลาติดตามคู่สมรส'}`"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<datepicker
|
||||
:readonly="!typeLeave"
|
||||
|
|
|
|||
|
|
@ -402,6 +402,7 @@ const modalDialogSalary = ref<boolean>(false); //แสดง popup ตำแห
|
|||
const isStatusEdit = ref<boolean>(false); //สถานะแก้ไขข้อมูลตำแหน่งเงินเดือน
|
||||
const salaryId = ref<string>(""); //id ที่ต้องการแก้ไข
|
||||
const dataLevel = ref<DataPosType[]>([]); //รายการ ตำแหน่งเงินเดือน
|
||||
const idCommandId = ref<boolean>(false); //เช็คว่ามี commandId หรือไม่
|
||||
|
||||
const commandCodeOptions = ref<DataOption[]>(store.commandCodeData); //รายการปรเภทคำสั่ง
|
||||
const posTypeOptions = ref<DataOption[]>(store.posTypeData); //รายการประเภทตำแหน่ง | กลุ่มงาน
|
||||
|
|
@ -658,6 +659,7 @@ async function onClickOpenDialog(
|
|||
} else {
|
||||
await fetchOptionGroup();
|
||||
}
|
||||
idCommandId.value = statusEdit ? (data.commandId ? true : false) : false;
|
||||
commandCodeOptions.value = store.commandCodeData;
|
||||
posTypeOptions.value = store.posTypeData;
|
||||
posLevelOptions.value = store.posLevelData;
|
||||
|
|
@ -978,6 +980,7 @@ onMounted(async () => {
|
|||
<q-tooltip>ประวัติแก้ไขตำแหน่ง/เงินเดือน</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<!-- :disable="(props.row.commandId !== null && props.row.commandId !== '') || props.row.commandType === 'C-PM-47'" -->
|
||||
<q-btn
|
||||
v-if="
|
||||
!isLeave &&
|
||||
|
|
@ -985,11 +988,7 @@ onMounted(async () => {
|
|||
checkPermission($route)?.attrOwnership === 'OWNER'
|
||||
"
|
||||
flat
|
||||
:disable="
|
||||
(props.row.commandId !== null && props.row.commandId !== '') ||
|
||||
props.row.commandType === 'C-PM-47'
|
||||
"
|
||||
:color="props.row.commandId ? 'grey' : 'edit'"
|
||||
color="edit"
|
||||
dense
|
||||
round
|
||||
icon="edit"
|
||||
|
|
@ -1154,7 +1153,8 @@ onMounted(async () => {
|
|||
<div class="row q-col-gutter-sm">
|
||||
<div class="col-6">
|
||||
<q-input
|
||||
:class="classInput(true)"
|
||||
:class="classInput(!idCommandId)"
|
||||
:readonly="idCommandId"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
|
|
@ -1174,7 +1174,8 @@ onMounted(async () => {
|
|||
autoApply
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
class="inputgreen"
|
||||
:class="classInput(!idCommandId)"
|
||||
:disabled="idCommandId"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
|
|
@ -1191,6 +1192,8 @@ onMounted(async () => {
|
|||
: formData.commandYear + 543
|
||||
"
|
||||
label="ปี พ.ศ."
|
||||
:class="classInput(!idCommandId)"
|
||||
:readonly="idCommandId"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
|
|||
|
|
@ -0,0 +1,424 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import { useRoute } from "vue-router";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useAbsentLateStore } from "@/modules/04_registryPerson/stores/AbsentLate";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
import type { QTableColumn } from "quasar";
|
||||
import type { ResAbsentLateData} from "@/modules/04_registryPerson/interface/response/Government";
|
||||
|
||||
import DialogAbsentLate from "@/modules/04_registryPerson/components/detail/GovernmentInformation/08_DialogAbsentLate.vue";
|
||||
import DialogHistory from "@/modules/04_registryPerson/components/detail/DialogHistory.vue";
|
||||
|
||||
const route = useRoute();
|
||||
const absentLateStore = useAbsentLateStore();
|
||||
const $q = useQuasar();
|
||||
const {
|
||||
date2Thai,
|
||||
dialogConfirm,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
messageError,
|
||||
success,
|
||||
pathRegistryEmp,
|
||||
onSearchDataTable,
|
||||
convertDateToAPI,
|
||||
dialogRemove,
|
||||
} = useCounterMixin();
|
||||
|
||||
const profileId = ref<string>(
|
||||
route.params.id ? route.params.id.toString() : ""
|
||||
);
|
||||
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
|
||||
|
||||
const isLeave = defineModel<boolean>("isLeave", {
|
||||
required: true,
|
||||
});
|
||||
|
||||
const baseColumns = ref<QTableColumn[]>([
|
||||
{
|
||||
name: "status",
|
||||
align: "left",
|
||||
label: "มาสาย/ ขาดราชการ",
|
||||
sortable: true,
|
||||
field: "status",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format(val, row) {
|
||||
const status = absentLateStore.statusOps.find(
|
||||
(option) => option.id === val
|
||||
);
|
||||
return status ? status.name : val;
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "stampDate",
|
||||
align: "left",
|
||||
label: "วันที่ลงเวลา",
|
||||
sortable: true,
|
||||
field: "stampDate",
|
||||
format: (v) => date2Thai(v),
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "stampType",
|
||||
align: "left",
|
||||
label: "ประเภทการลงเวลา",
|
||||
sortable: true,
|
||||
field: "stampType",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format(val) {
|
||||
const type = absentLateStore.stampTypeOps.find(
|
||||
(option) => option.id === val
|
||||
);
|
||||
return type ? type.name : val;
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "stampAmount",
|
||||
align: "left",
|
||||
label: "จำนวน",
|
||||
sortable: true,
|
||||
field: "stampAmount",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "remark",
|
||||
align: "left",
|
||||
label: "หมายเหตุ",
|
||||
sortable: true,
|
||||
field: "remark",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
const baseVisibleColumns = ref<string[]>([
|
||||
"status",
|
||||
"stampDate",
|
||||
"stampType",
|
||||
"stampAmount",
|
||||
"remark",
|
||||
]);
|
||||
|
||||
/** Table*/
|
||||
const rows = ref<ResAbsentLateData[]>([]);
|
||||
const rowsMain = ref<ResAbsentLateData[]>([]);
|
||||
const mode = ref<string>("table"); //การแสดงผล Table card
|
||||
const filterKeyword = ref<string>(""); //คำค้นหา
|
||||
const columns = ref<QTableColumn[]>(
|
||||
baseColumns.value.filter((e: QTableColumn) => e.name !== "lastUpdateFullName")
|
||||
);
|
||||
const visibleColumns = ref<string[]>(
|
||||
baseVisibleColumns.value.filter((e: string) => e !== "lastUpdateFullName")
|
||||
);
|
||||
const pagination = ref({
|
||||
sortBy: "lastUpdatedAt",
|
||||
});
|
||||
|
||||
const columnsHistory = ref<QTableColumn[]>(baseColumns.value);
|
||||
const visibleColumnsHistory = ref<string[]>(baseVisibleColumns.value);
|
||||
|
||||
/** Dialog*/
|
||||
const isStatusEdit = ref<boolean>(false);
|
||||
const modal = ref<boolean>(false);
|
||||
const modalHistory = ref<boolean>(false);
|
||||
const rowId = ref<string>("");
|
||||
const dataAbsentLate = ref<ResAbsentLateData | null>(null);
|
||||
|
||||
async function fetchData() {
|
||||
showLoader();
|
||||
try {
|
||||
const res = await http.get(
|
||||
config.API.profileAbsentLate(empType.value) + `/${profileId.value}`
|
||||
);
|
||||
const data = res.data.result;
|
||||
rowsMain.value = data;
|
||||
serchDataTable();
|
||||
} catch (err) {
|
||||
messageError($q, err);
|
||||
} finally {
|
||||
hideLoader();
|
||||
}
|
||||
}
|
||||
|
||||
/** function fetch ข้อมูลประวัติการแก้ไขข้อมูล*/
|
||||
async function fetchDataHistory() {
|
||||
showLoader();
|
||||
try {
|
||||
const res = await http.get(
|
||||
config.API.profileAbsentLateHistory(rowId.value, empType.value)
|
||||
);
|
||||
return res.data.result;
|
||||
} catch (err) {
|
||||
messageError($q, err);
|
||||
} finally {
|
||||
hideLoader();
|
||||
}
|
||||
}
|
||||
|
||||
function openEditDialog(data: any) {
|
||||
modal.value = true;
|
||||
isStatusEdit.value = true;
|
||||
rowId.value = data.id;
|
||||
dataAbsentLate.value = data;
|
||||
}
|
||||
|
||||
function showHistoryDialog(id: string) {
|
||||
modalHistory.value = true;
|
||||
rowId.value = id;
|
||||
}
|
||||
|
||||
/** ฟังก์ค้นหาข้อมูลขาดราชการ/มาสาย*/
|
||||
function serchDataTable() {
|
||||
rows.value = onSearchDataTable(
|
||||
filterKeyword.value,
|
||||
rowsMain.value,
|
||||
columns.value ? columns.value : []
|
||||
);
|
||||
}
|
||||
|
||||
function onDelete(rowId: string) {
|
||||
dialogRemove($q, async () => {
|
||||
showLoader();
|
||||
try {
|
||||
await http.patch(
|
||||
config.API.profileAbsentLateUpdateDelete(empType.value) + `/${rowId}`
|
||||
);
|
||||
await fetchData();
|
||||
await success($q, "ลบข้อมูลสำเร็จ");
|
||||
} catch (err) {
|
||||
messageError($q, err);
|
||||
} finally {
|
||||
hideLoader();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchData();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="row items-center q-gutter-x-sm q-pb-sm">
|
||||
<q-btn
|
||||
v-if="!isLeave && checkPermission($route)?.attrIsUpdate"
|
||||
dense
|
||||
color="primary"
|
||||
icon="add"
|
||||
flat
|
||||
round
|
||||
@click.stop.prevent="(modal = true), (isStatusEdit = false)"
|
||||
>
|
||||
<q-tooltip>เพิ่มข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-space />
|
||||
<q-input
|
||||
standout
|
||||
dense
|
||||
v-model="filterKeyword"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
placeholder="ค้นหา"
|
||||
@keydown.enter.prevent="serchDataTable"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
<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"
|
||||
style="min-width: 140px"
|
||||
/>
|
||||
<q-btn-toggle
|
||||
v-model="mode"
|
||||
dense
|
||||
class="no-shadow toggle-borderd"
|
||||
toggle-color="grey-4"
|
||||
:options="[
|
||||
{ value: 'table', slot: 'table' },
|
||||
{ value: 'card', slot: 'card' },
|
||||
]"
|
||||
>
|
||||
<template v-slot:table>
|
||||
<q-icon
|
||||
name="format_list_bulleted"
|
||||
size="24px"
|
||||
:style="{
|
||||
color: mode === 'table' ? '#787B7C' : '#C9D3DB',
|
||||
}"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<template v-slot:card>
|
||||
<q-icon
|
||||
name="mdi-view-grid-outline"
|
||||
size="24px"
|
||||
:style="{
|
||||
color: mode === 'card' ? '#787B7C' : '#C9D3DB',
|
||||
}"
|
||||
/>
|
||||
</template>
|
||||
</q-btn-toggle>
|
||||
</div>
|
||||
|
||||
<d-table
|
||||
:grid="mode === 'card'"
|
||||
ref="table"
|
||||
row-key="id"
|
||||
flat
|
||||
bordered
|
||||
dense
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
>
|
||||
<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" v-if="mode === 'table'">
|
||||
<q-tr :props="props">
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
flat
|
||||
dense
|
||||
round
|
||||
color="deep-purple"
|
||||
icon="mdi-history"
|
||||
@click.stop.prevent="showHistoryDialog(props.row.id)"
|
||||
>
|
||||
<q-tooltip>ประวัติแก้ไขขาดราชการ/มาสาย</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
v-if="!isLeave && checkPermission($route)?.attrIsUpdate"
|
||||
flat
|
||||
dense
|
||||
round
|
||||
color="edit"
|
||||
icon="edit"
|
||||
@click.stop.prevent="openEditDialog(props.row)"
|
||||
>
|
||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-if="!isLeave && checkPermission($route)?.attrIsDelete"
|
||||
flat
|
||||
dense
|
||||
round
|
||||
color="red"
|
||||
icon="delete"
|
||||
@click.stop.prevent="onDelete(props.row.id)"
|
||||
>
|
||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td v-for="col in props.cols" :key="col.id">
|
||||
<div>
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:item="props" v-else>
|
||||
<div class="q-pa-xs col-xs-12 col-sm-4 col-md-3">
|
||||
<q-card flat bordered>
|
||||
<q-card-actions align="right" class="bg-grey-3">
|
||||
<q-btn
|
||||
color="deep-purple"
|
||||
icon="mdi-history"
|
||||
flat
|
||||
round
|
||||
@click.stop.prevent="showHistoryDialog(props.row.id)"
|
||||
>
|
||||
<q-tooltip>ประวัติแก้ไขขาดราชการ/มาสาย</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-if="isLeave === false && checkPermission($route)?.attrIsUpdate"
|
||||
:color="props.row.commandId ? 'grey-5' : 'edit'"
|
||||
:disable="props.row.commandId !== null"
|
||||
icon="edit"
|
||||
flat
|
||||
round
|
||||
@click.stop.prevent="openEditDialog(props.row)"
|
||||
>
|
||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-if="isLeave === false && checkPermission($route)?.attrIsDelete"
|
||||
color="red"
|
||||
icon="delete"
|
||||
flat
|
||||
round
|
||||
@click.stop.prevent="onDelete(props.row.id)"
|
||||
>
|
||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</q-card-actions>
|
||||
<q-separator />
|
||||
|
||||
<q-list>
|
||||
<div
|
||||
:class="`row q-pa-sm`"
|
||||
:style="`background-color: ${index % 2 !== 0 ? '#FAFAFA' : ''}`"
|
||||
v-for="(col, index) in props.cols"
|
||||
:key="col.name"
|
||||
>
|
||||
<div class="col text-grey-6">
|
||||
<div>{{ col.label }}</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div>{{ col.value ? col.value : "-" }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-list>
|
||||
</q-card>
|
||||
</div>
|
||||
</template>
|
||||
</d-table>
|
||||
|
||||
<DialogAbsentLate
|
||||
v-model:modal="modal"
|
||||
v-model:isStatusEdit="isStatusEdit"
|
||||
:fetchData="fetchData"
|
||||
:rowId="rowId"
|
||||
:dataAbsentLate="dataAbsentLate"
|
||||
/>
|
||||
|
||||
<DialogHistory
|
||||
v-model:modal="modalHistory"
|
||||
:title="`ประวัติแก้ไขขาดราชการ/มาสาย`"
|
||||
:columns="columnsHistory"
|
||||
:visible-columns="visibleColumnsHistory"
|
||||
:fetch-data="fetchDataHistory"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -0,0 +1,263 @@
|
|||
<script setup lang="ts">
|
||||
import { reactive, ref, computed, watch } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import { useRoute } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useAbsentLateStore } from "@/modules/04_registryPerson/stores/AbsentLate";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
/** import components*/
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
//use
|
||||
const $q = useQuasar();
|
||||
const route = useRoute();
|
||||
const absentLateStore = useAbsentLateStore();
|
||||
const {
|
||||
showLoader,
|
||||
hideLoader,
|
||||
messageError,
|
||||
success,
|
||||
date2Thai,
|
||||
convertDateToAPI,
|
||||
dialogConfirm,
|
||||
pathRegistryEmp,
|
||||
} = useCounterMixin();
|
||||
|
||||
//props
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
const isStatusEdit = defineModel<boolean>("isStatusEdit", { required: true });
|
||||
const rowId = defineModel<string>("rowId", { required: true });
|
||||
|
||||
const props = defineProps<{
|
||||
fetchData: () => Promise<void>;
|
||||
dataAbsentLate: any;
|
||||
}>();
|
||||
|
||||
const profileId = ref<string>(route.params.id?.toString() ?? ""); //ProfileId
|
||||
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
|
||||
|
||||
const form = reactive({
|
||||
status: "",
|
||||
stampDate: new Date(),
|
||||
stampType: "FULL_DAY",
|
||||
stampAmount: "1.0",
|
||||
remark: "",
|
||||
});
|
||||
|
||||
const tittle = computed(() => {
|
||||
return isStatusEdit.value
|
||||
? "แก้ไขข้อมูลขาดราชการ/มาสาย"
|
||||
: "เพิ่มข้อมูลขาดราชการ/มาสาย";
|
||||
});
|
||||
|
||||
function onSubmit() {
|
||||
dialogConfirm($q, async () => {
|
||||
try {
|
||||
showLoader();
|
||||
const payload = {
|
||||
...form,
|
||||
stampDate: convertDateToAPI(form.stampDate),
|
||||
profileId:
|
||||
!isStatusEdit.value && empType.value === ""
|
||||
? profileId.value
|
||||
: undefined,
|
||||
profileEmployeeId:
|
||||
!isStatusEdit.value && empType.value !== ""
|
||||
? profileId.value
|
||||
: undefined,
|
||||
};
|
||||
const method = isStatusEdit.value ? "patch" : "post";
|
||||
const url = isStatusEdit.value
|
||||
? config.API.profileAbsentLate(empType.value) + `/${rowId.value}`
|
||||
: config.API.profileAbsentLate(empType.value);
|
||||
await http[method](url, payload);
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
props.fetchData();
|
||||
closeDialog();
|
||||
} catch (error) {
|
||||
messageError($q, error);
|
||||
} finally {
|
||||
hideLoader();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** function ปิด popup*/
|
||||
function closeDialog() {
|
||||
modal.value = false;
|
||||
}
|
||||
|
||||
watch(
|
||||
() => form.stampType,
|
||||
(stampType) => {
|
||||
if (stampType === "FULL_DAY") {
|
||||
form.stampAmount = "1.0";
|
||||
} else if (stampType === "MORNING" || stampType === "AFTERNOON") {
|
||||
form.stampAmount = "0.5";
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
watch(
|
||||
() => modal.value,
|
||||
(newVal) => {
|
||||
if (newVal) {
|
||||
form.status = isStatusEdit.value ? props.dataAbsentLate.status : "";
|
||||
form.stampDate = isStatusEdit.value
|
||||
? new Date(props.dataAbsentLate.stampDate)
|
||||
: new Date();
|
||||
form.stampType = isStatusEdit.value
|
||||
? props.dataAbsentLate.stampType
|
||||
: "FULL_DAY";
|
||||
form.stampAmount = isStatusEdit.value
|
||||
? props.dataAbsentLate.stampAmount
|
||||
: "1.0";
|
||||
form.remark = isStatusEdit.value ? props.dataAbsentLate.remark : "";
|
||||
}
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<q-dialog v-model="modal" persistent>
|
||||
<q-card style="min-width: 50vw">
|
||||
<q-form greedy @submit.prevent="onSubmit">
|
||||
<DialogHeader :tittle="tittle" :close="closeDialog" />
|
||||
<q-separator />
|
||||
|
||||
<q-card-section class="q-pa-md">
|
||||
<div class="col-12 row q-col-gutter-sm">
|
||||
<div class="col-12 row">
|
||||
<div class="col-md-4 col-sm-12">
|
||||
<q-select
|
||||
class="full-width inputgreen cursor-pointer"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="form.status"
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกสถานะ'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'สถานะ'}`"
|
||||
map-options
|
||||
emit-value
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
:options="absentLateStore.statusOps"
|
||||
use-input
|
||||
hide-selected
|
||||
fill-input
|
||||
input-debounce="0"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-sm-12">
|
||||
<datepicker
|
||||
class="inputgreen"
|
||||
menu-class-name="modalfix"
|
||||
v-model="form.stampDate"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
</template>
|
||||
<template #year-overlay-value="{ value }">
|
||||
{{ parseInt(value + 543) }}
|
||||
</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
hide-bottom-space
|
||||
class="full-width"
|
||||
:model-value="
|
||||
form.stampDate != null ? date2Thai(form.stampDate) : null
|
||||
"
|
||||
:label="`${'วันที่ลงเวลา'}`"
|
||||
:rules="[
|
||||
(val: string) =>
|
||||
!!val || `${'กรุณาเลือกวันที่ลงเวลา'}`,
|
||||
]"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
<div class="col-md-4 col-xs-12">
|
||||
<q-select
|
||||
class="full-width inputgreen cursor-pointer"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="form.stampType"
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกประเภทการลงเวลา'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'ประเภทการลงเวลา'}`"
|
||||
map-options
|
||||
emit-value
|
||||
option-label="name"
|
||||
:options="absentLateStore.stampTypeOps"
|
||||
option-value="id"
|
||||
use-input
|
||||
hide-selected
|
||||
fill-input
|
||||
input-debounce="0"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-xs-12">
|
||||
<q-input
|
||||
class="inputgreen"
|
||||
dense
|
||||
outlined
|
||||
v-model="form.stampAmount"
|
||||
label="จำนวน"
|
||||
hide-bottom-space
|
||||
readonly
|
||||
:rules="[(val:string) => !!val ||
|
||||
`${'กรุณากรอกจำนวน'}`]"
|
||||
mask="#.#"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
class="inputgreen"
|
||||
dense
|
||||
outlined
|
||||
v-model="form.remark"
|
||||
label="เหตุผล"
|
||||
hide-bottom-space
|
||||
type="textarea"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
|
||||
<q-card-actions align="right">
|
||||
<q-btn type="submit" :label="`บันทึก`" color="public">
|
||||
<q-tooltip>บันทึก</q-tooltip>
|
||||
</q-btn>
|
||||
</q-card-actions>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -14,6 +14,7 @@ import PerformSpecialWork from "@/modules/04_registryPerson/components/detail/Go
|
|||
import ActingPos from "@/modules/04_registryPerson/components/detail/GovernmentInformation/05_ActingPos.vue"; //รักษาการในตำแหน่ง
|
||||
import HelpGovernmentDetail from "@/modules/04_registryPerson/components/detail/GovernmentInformation/06_HelpGovernment.vue"; //ช่วยราชการ
|
||||
import Postion from "@/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue";
|
||||
import AbsentLate from "@/modules/04_registryPerson/components/detail/GovernmentInformation/08_AbsentLate.vue";
|
||||
import { useRegistryNewDataStore } from "@/modules/04_registryPerson/store";
|
||||
|
||||
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
|
||||
|
|
@ -47,6 +48,7 @@ const storeRegistry = useRegistryNewDataStore();
|
|||
<q-tab v-if="empType != '-employee'" name="6" label="ช่วยราชการ" />
|
||||
<q-tab name="2" label="วินัย" />
|
||||
<q-tab name="3" label="การลา" />
|
||||
<q-tab name="8" label="ขาดราชการ/มาสาย" />
|
||||
<q-tab name="4" label="ปฏิบัติราชการพิเศษ" />
|
||||
</q-tabs>
|
||||
<q-separator />
|
||||
|
|
@ -76,6 +78,9 @@ const storeRegistry = useRegistryNewDataStore();
|
|||
:citizen-id="storeRegistry.citizenId"
|
||||
/>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="8">
|
||||
<AbsentLate :is-leave="storeRegistry.isLeave" />
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="7">
|
||||
<Postion
|
||||
:is-leave="storeRegistry.isLeave"
|
||||
|
|
|
|||
|
|
@ -406,6 +406,12 @@ function calculateMinDate() {
|
|||
return today;
|
||||
}
|
||||
|
||||
function prefixRankRule() {
|
||||
return [
|
||||
() => !!formData.rank || !!formData.prefix || "กรุณาเลือกคำนำหน้าชื่อ หรือยศ",
|
||||
];
|
||||
}
|
||||
|
||||
/** ดูการเปลี่ยนแปลงของวันเกิดเมื่อมีการเปลี่ยนแปลงจะคำนวนอายูใหม่*/
|
||||
watch(
|
||||
() => formData.birthDate,
|
||||
|
|
@ -599,7 +605,8 @@ onMounted(() => {
|
|||
class="inputgreen"
|
||||
:options="store.Ops.prefixOps"
|
||||
:label="dataLabel.prefix"
|
||||
:rules="[(val: string) => !!formData.rank || !!formData.prefix || `${'กรุณาเลือกคำนำหน้าชื่อ หรือยศ'}`]"
|
||||
:rules="prefixRankRule()"
|
||||
reactive-rules
|
||||
@filter="(inputValue: string,
|
||||
doneFn: Function) => filterSelector(inputValue, doneFn, 'prefixOps'
|
||||
)"
|
||||
|
|
@ -620,7 +627,8 @@ onMounted(() => {
|
|||
input-debounce="0"
|
||||
option-label="name"
|
||||
option-value="name"
|
||||
:rules="[(val: string) => !!formData.rank || !!formData.prefix || `${'กรุณาเลือกคำนำหน้าชื่อ หรือยศ'}`]"
|
||||
:rules="prefixRankRule()"
|
||||
reactive-rules
|
||||
v-model="formData.rank"
|
||||
class="inputgreen"
|
||||
:options="store.Ops.rankOps"
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ const keyword = ref<string>(""); //คำค้นหา
|
|||
const modalCommand = ref<boolean>(false);
|
||||
const command = ref<string>("");
|
||||
const commandId = ref<string>("");
|
||||
const idCommandId = ref<boolean>(false); //สถานะการมีคำสั่ง
|
||||
const baseColumns = ref<QTableColumn[]>([
|
||||
{
|
||||
name: "commandDateAffect",
|
||||
|
|
@ -638,6 +639,7 @@ async function onClickOpenDialog(
|
|||
} else {
|
||||
await fetchOptionGroup();
|
||||
}
|
||||
idCommandId.value = statusEdit && data.commandId ? true : false;
|
||||
commandCodeOptions.value = store.commandCodeData;
|
||||
posTypeOptions.value = store.posTypeData;
|
||||
posLevelOptions.value = store.posLevelData;
|
||||
|
|
@ -939,6 +941,10 @@ onMounted(async () => {
|
|||
>
|
||||
<q-tooltip>ประวัติแก้ไขตำแหน่ง/เงินเดือน</q-tooltip>
|
||||
</q-btn>
|
||||
<!-- :disable="
|
||||
(props.row.commandId !== null && props.row.commandId !== '') ||
|
||||
props.row.commandType === 'C-PM-47'
|
||||
" -->
|
||||
<q-btn
|
||||
v-if="
|
||||
!isLeave &&
|
||||
|
|
@ -946,11 +952,7 @@ onMounted(async () => {
|
|||
checkPermission($route)?.attrOwnership === 'OWNER'
|
||||
"
|
||||
flat
|
||||
:disable="
|
||||
(props.row.commandId !== null && props.row.commandId !== '') ||
|
||||
props.row.commandType === 'C-PM-47'
|
||||
"
|
||||
:color="props.row.commandId ? 'grey' : 'edit'"
|
||||
color="edit"
|
||||
dense
|
||||
round
|
||||
icon="edit"
|
||||
|
|
@ -1119,7 +1121,8 @@ onMounted(async () => {
|
|||
<div class="row q-col-gutter-sm">
|
||||
<div class="col-6">
|
||||
<q-input
|
||||
:class="classInput(true)"
|
||||
:class="classInput(!idCommandId)"
|
||||
:readonly="idCommandId"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
|
|
@ -1139,7 +1142,8 @@ onMounted(async () => {
|
|||
autoApply
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
class="inputgreen"
|
||||
:class="classInput(!idCommandId)"
|
||||
:disable="idCommandId"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
|
|
@ -1156,6 +1160,8 @@ onMounted(async () => {
|
|||
: formData.commandYear + 543
|
||||
"
|
||||
label="ปี พ.ศ."
|
||||
:class="classInput(!idCommandId)"
|
||||
:readonly="idCommandId"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@ interface DetailData {
|
|||
reason: string;
|
||||
typeLeaveId: string;
|
||||
code: string;
|
||||
codeLeave:string
|
||||
leaveSubTypeName:string
|
||||
coupleDayLevelCountry:string
|
||||
}
|
||||
|
||||
interface FormFilter {
|
||||
|
|
|
|||
|
|
@ -44,4 +44,21 @@ interface ResFileData {
|
|||
pathname: string;
|
||||
}
|
||||
|
||||
export type { ResActingPosData, ResAssistanceData, ResFileData };
|
||||
interface ResAbsentLateData {
|
||||
createdAt: string;
|
||||
createdFullName: string;
|
||||
createdUserId: string;
|
||||
id: string;
|
||||
isDeleted: boolean;
|
||||
lastUpdateFullName: string;
|
||||
lastUpdateUserId: string;
|
||||
lastUpdatedAt: string;
|
||||
profileId: string;
|
||||
remark: string;
|
||||
stampAmount: string;
|
||||
stampDate: string;
|
||||
stampType: string;
|
||||
status: string;
|
||||
}
|
||||
|
||||
export type { ResActingPosData, ResAssistanceData, ResFileData, ResAbsentLateData };
|
||||
|
|
|
|||
19
src/modules/04_registryPerson/stores/AbsentLate.ts
Normal file
19
src/modules/04_registryPerson/stores/AbsentLate.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { ref } from "vue";
|
||||
import { defineStore } from "pinia";
|
||||
|
||||
import type { DataOption } from "@/modules/04_registryPerson/interface/index/Main";
|
||||
|
||||
export const useAbsentLateStore = defineStore("absentLate", () => {
|
||||
const statusOps = ref<DataOption[]>([
|
||||
{ name: "ขาดราชการ", id: "ABSENT" },
|
||||
{ name: "มาสาย", id: "LATE" },
|
||||
]);
|
||||
|
||||
const stampTypeOps = ref<DataOption[]>([
|
||||
{ name: "เต็มวัน", id: "FULL_DAY" },
|
||||
{ name: "ครึ่งเช้า", id: "MORNING" },
|
||||
{ name: "ครึ่งบ่าย ", id: "AFTERNOON" },
|
||||
]);
|
||||
|
||||
return { statusOps, stampTypeOps };
|
||||
});
|
||||
|
|
@ -806,9 +806,13 @@ function handleBackNavigation() {
|
|||
router.go(-1);
|
||||
} else {
|
||||
if (empType.value === "") {
|
||||
router.push("/registry-officer");
|
||||
storeRegistry.isLeave
|
||||
? router.push("/registry-retire-officer")
|
||||
: router.push("/registry-officer");
|
||||
} else if (empType.value === "-employee") {
|
||||
router.push("/registry-employee");
|
||||
storeRegistry.isLeave
|
||||
? router.push("/registry-retire-employee")
|
||||
: router.push("/registry-employee");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ const saveData = async () => {
|
|||
changeBtn();
|
||||
onEdit.value = false;
|
||||
edit.value = false;
|
||||
emit("update:statusEdit", false);
|
||||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<!-- ส่วนหัวของ ข้อมูลส่วนตัว และ ที่อยู่ -->
|
||||
<script setup lang="ts">
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import { ref } from "vue";
|
||||
import { computed } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
const route = useRoute();
|
||||
|
|
@ -62,9 +62,9 @@ const props = defineProps({
|
|||
});
|
||||
|
||||
const emit = defineEmits(["update:edit"]);
|
||||
const isEdit = ref<boolean>(
|
||||
checkPermission(route)?.attrIsUpdate ? true : false
|
||||
);
|
||||
const isEdit = computed(() => {
|
||||
return checkPermission(route)?.attrIsUpdate ? true : false;
|
||||
});
|
||||
|
||||
const updateEdit = (value: any) => {
|
||||
emit("update:edit", value);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { ref, watch } from "vue";
|
|||
import { useQuasar } from "quasar";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { calculateAge } from "@/utils/function";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
|
|
@ -38,6 +39,20 @@ const props = defineProps({
|
|||
|
||||
const rows = ref<DataEducation[]>([]);
|
||||
const personalForm = ref<DataPerson>();
|
||||
const age = ref<string | null>(""); //อายุ
|
||||
|
||||
// ข้อมูลแปลงจาก ID เป็นชื่อ
|
||||
const currentProvinceName = ref<string>("");
|
||||
const currentDistrictName = ref<string>("");
|
||||
const currentSubDistrictName = ref<string>("");
|
||||
const registProvinceName = ref<string>("");
|
||||
const registDistrictName = ref<string>("");
|
||||
const registSubDistrictName = ref<string>("");
|
||||
|
||||
// Cache ข้อมูล
|
||||
const provincesCache = ref<any[]>([]);
|
||||
const districtsCache = ref<Map<string, any[]>>(new Map()); // key: provinceId, value: districts[]
|
||||
const subDistrictsCache = ref<Map<string, any[]>>(new Map()); // key: districtId, value: subDistricts[]
|
||||
|
||||
/**หัวตาราง */
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
|
|
@ -87,11 +102,20 @@ const columns = ref<QTableProps["columns"]>([
|
|||
* ฟังก์ชันดึงข้อมูลรายละเอียด
|
||||
*/
|
||||
async function fetchData() {
|
||||
// Reset ข้อมูลเก่าก่อนโหลดข้อมูลใหม่
|
||||
resetData();
|
||||
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.getDatapersonal(props.personalId))
|
||||
.then((res) => {
|
||||
personalForm.value = res.data.result;
|
||||
if (res.data.result.dateOfBirth) {
|
||||
// กำหนดอายุ ส่งวันเกิดไปคำนวน
|
||||
age.value = calculateAge(res.data.result.dateOfBirth);
|
||||
} else {
|
||||
age.value = null;
|
||||
}
|
||||
personalForm.value?.education.map((e: Education) => {
|
||||
rows.value.push({
|
||||
university: e.institute,
|
||||
|
|
@ -107,6 +131,159 @@ async function fetchData() {
|
|||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
|
||||
// แปลง ID เป็นชื่อ
|
||||
await convertAddressIds();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset ข้อมูลทุกครั้งที่เปิดคนใหม่
|
||||
*/
|
||||
function resetData() {
|
||||
// Reset ข้อมูลส่วนตัว
|
||||
personalForm.value = undefined;
|
||||
age.value = "";
|
||||
rows.value = [];
|
||||
|
||||
// Reset ข้อมูลที่อยู่
|
||||
currentProvinceName.value = "";
|
||||
currentDistrictName.value = "";
|
||||
currentSubDistrictName.value = "";
|
||||
registProvinceName.value = "";
|
||||
registDistrictName.value = "";
|
||||
registSubDistrictName.value = "";
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันแปลง ID เป็นชื่อจริงของที่อยู่ (แบบ optimize)
|
||||
*/
|
||||
async function convertAddressIds() {
|
||||
if (!personalForm.value) return;
|
||||
|
||||
try {
|
||||
// โหลดข้อมูลจังหวัดครั้งเดียวถ้ายังไม่มี
|
||||
await loadProvinces();
|
||||
|
||||
// แปลงข้อมูลที่อยู่ปัจจุบัน
|
||||
if (personalForm.value.currentProvinceId && personalForm.value.currentProvinceId.trim() !== "") {
|
||||
currentProvinceName.value = getProvinceNameFromCache(
|
||||
personalForm.value.currentProvinceId
|
||||
);
|
||||
|
||||
if (personalForm.value.currentDistrictId && personalForm.value.currentDistrictId.trim() !== "") {
|
||||
currentDistrictName.value = await getDistrictNameOptimized(
|
||||
personalForm.value.currentProvinceId,
|
||||
personalForm.value.currentDistrictId
|
||||
);
|
||||
|
||||
if (personalForm.value.currentSubDistrictId && personalForm.value.currentSubDistrictId.trim() !== "") {
|
||||
currentSubDistrictName.value = await getSubDistrictNameOptimized(
|
||||
personalForm.value.currentDistrictId,
|
||||
personalForm.value.currentSubDistrictId
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// แปลงข้อมูลที่อยู่ตามทะเบียน
|
||||
if (personalForm.value.registProvinceId && personalForm.value.registProvinceId.trim() !== "") {
|
||||
registProvinceName.value = getProvinceNameFromCache(
|
||||
personalForm.value.registProvinceId
|
||||
);
|
||||
|
||||
if (personalForm.value.registDistrictId && personalForm.value.registDistrictId.trim() !== "") {
|
||||
registDistrictName.value = await getDistrictNameOptimized(
|
||||
personalForm.value.registProvinceId,
|
||||
personalForm.value.registDistrictId
|
||||
);
|
||||
|
||||
if (personalForm.value.registSubDistrictId && personalForm.value.registSubDistrictId.trim() !== "") {
|
||||
registSubDistrictName.value = await getSubDistrictNameOptimized(
|
||||
personalForm.value.registDistrictId,
|
||||
personalForm.value.registSubDistrictId
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error converting address IDs:", error);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* โหลดข้อมูลจังหวัดทั้งหมด (ครั้งเดียว)
|
||||
*/
|
||||
async function loadProvinces() {
|
||||
if (provincesCache.value.length === 0) {
|
||||
try {
|
||||
const res = await http.get(config.API.province);
|
||||
provincesCache.value = res.data.result;
|
||||
} catch (error) {
|
||||
console.error("Error loading provinces:", error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ดึงชื่อจังหวัดจาก cache
|
||||
*/
|
||||
function getProvinceNameFromCache(provinceId: string): string {
|
||||
const province = provincesCache.value.find(
|
||||
(p: any) => p.id.toString() === provinceId
|
||||
);
|
||||
return province ? province.name : "-";
|
||||
}
|
||||
|
||||
/**
|
||||
* ดึงชื่ออำเภอแบบ optimize (เรียก API เฉพาะจังหวัดที่ต้องการ)
|
||||
* @param provinceId ID ของจังหวัด
|
||||
* @param districtId ID ของอำเภอ
|
||||
*/
|
||||
async function getDistrictNameOptimized(
|
||||
provinceId: string,
|
||||
districtId: string
|
||||
): Promise<string> {
|
||||
try {
|
||||
// เช็ค cache ว่ามีข้อมูล districts ของ province นี้หรือไม่
|
||||
if (!districtsCache.value.has(provinceId)) {
|
||||
const res = await http.get(config.API.listDistrict(provinceId));
|
||||
districtsCache.value.set(provinceId, res.data.result.districts);
|
||||
}
|
||||
|
||||
const districts = districtsCache.value.get(provinceId) || [];
|
||||
const district = districts.find((d: any) => d.id.toString() === districtId);
|
||||
return district ? district.name : "-";
|
||||
} catch (error) {
|
||||
console.error("Error loading district:", error);
|
||||
return "-";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ดึงชื่อตำบลแบบ optimize (เรียก API เฉพาะอำเภอที่ต้องการ)
|
||||
* @param districtId ID ของอำเภอ
|
||||
* @param subDistrictId ID ของตำบล
|
||||
*/
|
||||
async function getSubDistrictNameOptimized(
|
||||
districtId: string,
|
||||
subDistrictId: string
|
||||
): Promise<string> {
|
||||
try {
|
||||
// เช็ค cache ว่ามีข้อมูล subDistricts ของ district นี้หรือไม่
|
||||
if (!subDistrictsCache.value.has(districtId)) {
|
||||
const res = await http.get(config.API.listSubDistrict(districtId));
|
||||
subDistrictsCache.value.set(districtId, res.data.result.subDistricts);
|
||||
}
|
||||
|
||||
const subDistricts = subDistrictsCache.value.get(districtId) || [];
|
||||
const subDistrict = subDistricts.find(
|
||||
(sd: any) => sd.id.toString() === subDistrictId
|
||||
);
|
||||
return subDistrict ? subDistrict.name : "-";
|
||||
} catch (error) {
|
||||
console.error("Error loading subdistrict:", error);
|
||||
return "-";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -131,7 +308,7 @@ function formBmaofficer(val: string) {
|
|||
*/
|
||||
async function close() {
|
||||
props.close();
|
||||
rows.value = [];
|
||||
resetData(); // Reset ข้อมูลเมื่อปิด dialog
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -170,30 +347,58 @@ watch(props, () => {
|
|||
|
||||
<div class="row q-pa-xs">
|
||||
<div class="col-3 header-sub-text">
|
||||
<div class="q-pb-md">เลขประจำตัวประชาชน</div>
|
||||
<div>วัน/เดือน/ปีเกิด</div>
|
||||
<div class="q-pb-sm">เลขประจำตัวประชาชน</div>
|
||||
<div class="q-pb-sm">วัน/เดือน/ปีเกิด</div>
|
||||
<div class="q-pb-sm">อายุ</div>
|
||||
<div class="q-pb-sm">สัญชาติ</div>
|
||||
<div>หมู่เลือด</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4 sub-text">
|
||||
<div class="q-pb-md">
|
||||
<div class="q-pb-sm">
|
||||
{{ personalForm?.idCard }}
|
||||
</div>
|
||||
<div>
|
||||
<div class="q-pb-sm">
|
||||
{{ date2Thai(personalForm?.dateOfBirth) }}
|
||||
</div>
|
||||
<div class="q-pb-sm">
|
||||
{{ age ? age : "-" }}
|
||||
</div>
|
||||
<div class="q-pb-sm">
|
||||
{{
|
||||
personalForm?.nationality ? personalForm.nationality : "-"
|
||||
}}
|
||||
</div>
|
||||
<div>
|
||||
{{
|
||||
personalForm?.bloodGroup ? personalForm.bloodGroup : "-"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-2 header-sub-text">
|
||||
<div class="q-pb-md">ชื่อ-นามสกุล</div>
|
||||
<div>เพศ</div>
|
||||
<div class="q-pb-sm">ชื่อ-นามสกุล</div>
|
||||
<div class="q-pb-sm">เพศ</div>
|
||||
<div class="q-pb-sm">เชื้อชาติ</div>
|
||||
<div class="q-pb-sm">ศาสนา</div>
|
||||
<div>เบอร์โทรศัพท์</div>
|
||||
</div>
|
||||
<div class="col-3 sub-text">
|
||||
<div class="q-pb-md">
|
||||
<div class="q-pb-sm">
|
||||
{{ personalForm?.fullName }}
|
||||
</div>
|
||||
<div>
|
||||
<div class="q-pb-sm">
|
||||
{{ personalForm?.gender }}
|
||||
</div>
|
||||
<div class="q-pb-sm">
|
||||
{{ personalForm?.race ? personalForm.race : "-" }}
|
||||
</div>
|
||||
<div class="q-pb-sm">
|
||||
{{ personalForm?.religion ? personalForm.religion : "-" }}
|
||||
</div>
|
||||
<div class="q-mt-sm">
|
||||
{{ personalForm?.telephone ? personalForm.telephone : "-" }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
|
|
@ -203,9 +408,90 @@ watch(props, () => {
|
|||
<q-card bordered class="card-panding">
|
||||
<div class="row items-center q-pa-xs header-text">ภูมิลำเนา</div>
|
||||
<div class="row q-pa-xs">
|
||||
<div class="col-3 header-sub-text">ที่อยู่</div>
|
||||
<div class="col-9 sub-text">
|
||||
{{ personalForm?.registAddress }}
|
||||
<!-- ที่อยู่ปัจจุบัน -->
|
||||
<div class="col-6">
|
||||
<div class="q-pb-sm text-weight-medium text-primary">
|
||||
ที่อยู่ปัจจุบัน
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4 header-sub-text">
|
||||
<div class="q-pb-sm">ที่อยู่</div>
|
||||
<div class="q-pb-sm">จังหวัด</div>
|
||||
<div class="q-pb-sm">เขต/อำเภอ</div>
|
||||
<div class="q-pb-sm">แขวง/ตำบล</div>
|
||||
<div>รหัสไปรษณีย์</div>
|
||||
</div>
|
||||
<div class="col-8 sub-text">
|
||||
<div class="q-pb-sm">
|
||||
{{
|
||||
personalForm?.currentAddress
|
||||
? personalForm.currentAddress
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
<div class="q-pb-sm">
|
||||
{{ currentProvinceName ? currentProvinceName : "-" }}
|
||||
</div>
|
||||
<div class="q-pb-sm">
|
||||
{{ currentDistrictName ? currentDistrictName : "-" }}
|
||||
</div>
|
||||
<div class="q-pb-sm">
|
||||
{{
|
||||
currentSubDistrictName ? currentSubDistrictName : "-"
|
||||
}}
|
||||
</div>
|
||||
<div class="q-mt-sm">
|
||||
{{
|
||||
personalForm?.currentZipCode
|
||||
? personalForm.currentZipCode
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ที่อยู่ตามทะเบียนบ้าน -->
|
||||
<div class="col-6">
|
||||
<div class="q-pb-sm text-weight-medium text-primary">
|
||||
ที่อยู่ตามทะเบียนบ้าน
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4 header-sub-text">
|
||||
<div class="q-pb-sm">ที่อยู่</div>
|
||||
<div class="q-pb-sm">จังหวัด</div>
|
||||
<div class="q-pb-sm">เขต/อำเภอ</div>
|
||||
<div class="q-pb-sm">แขวง/ตำบล</div>
|
||||
<div>รหัสไปรษณีย์</div>
|
||||
</div>
|
||||
<div class="col-8 sub-text">
|
||||
<div class="q-pb-sm">
|
||||
{{
|
||||
personalForm?.registAddress
|
||||
? personalForm.registAddress
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
<div class="q-pb-sm">
|
||||
{{ registProvinceName ? registProvinceName : "-" }}
|
||||
</div>
|
||||
<div class="q-pb-sm">
|
||||
{{ registDistrictName ? registDistrictName : "-" }}
|
||||
</div>
|
||||
<div class="q-pb-sm">
|
||||
{{
|
||||
registSubDistrictName ? registSubDistrictName : "-"
|
||||
}}
|
||||
</div>
|
||||
<div class="q-mt-sm">
|
||||
{{
|
||||
personalForm?.registZipCode
|
||||
? personalForm.registZipCode
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import { useRoute, useRouter } from "vue-router";
|
|||
import { checkPermission } from "@/utils/permissions";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { usePlacementDataStore } from "@/modules/05_placement/store";
|
||||
import { useMenuDataStore } from "@/stores/menuList";
|
||||
import avatar from "@/assets/avatar_user.jpg";
|
||||
|
||||
import type { PartialTableName } from "@/modules/05_placement/interface/request/placement";
|
||||
|
|
@ -27,6 +28,7 @@ import DialogPreviewCommand from "@/modules/18_command/components/DialogPreviewC
|
|||
|
||||
const $q = useQuasar(); // show dialog
|
||||
const DataStore = usePlacementDataStore();
|
||||
const storeMenu = useMenuDataStore();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
|
|
@ -55,7 +57,14 @@ const command = ref<string>("");
|
|||
const commandId = ref<string>("");
|
||||
const commandCitizenId = ref<string>("");
|
||||
|
||||
let roleAdmin = ref<boolean>(false);
|
||||
// เปลี่ยนจาก ref เป็น computed property
|
||||
const roleAdmin = computed(() => {
|
||||
if (!storeMenu.permissions) return false;
|
||||
|
||||
const permission = checkPermission(route);
|
||||
return DataStore.isOfficer || permission?.attrOwnership == "OWNER";
|
||||
});
|
||||
|
||||
const edit = ref<boolean>(true);
|
||||
const modalPersonal = ref<boolean>(false);
|
||||
const modal = ref<boolean>(false); //modal ขอผ่อนผัน + สละสิทธิ์
|
||||
|
|
@ -84,7 +93,6 @@ const appointModal = ref<boolean>(false);
|
|||
const getNumFile = ref(0);
|
||||
const dataRes = ref<any>([]);
|
||||
const personal = ref<any>([]);
|
||||
const displayAdd = ref<boolean>(true);
|
||||
const containStatus = ref<boolean>(false);
|
||||
const modaladdlist = ref<boolean>(false);
|
||||
const selected = ref<any>([]);
|
||||
|
|
@ -92,6 +100,13 @@ const personal_selected = ref<any>([]);
|
|||
const filterlistAdd = ref<string>("");
|
||||
const paging = ref<boolean>(true);
|
||||
|
||||
const displayAdd = computed(() => {
|
||||
if (!storeMenu.permissions) return true;
|
||||
|
||||
const permission = checkPermission(route);
|
||||
return roleAdmin.value || permission?.attrOwnership === "OWNER";
|
||||
});
|
||||
|
||||
// เช็ตสถานะการเลือกคนไปยังหน่วยงาน
|
||||
const checkSelected = computed(() => {
|
||||
if (selected.value.length === 0) {
|
||||
|
|
@ -248,16 +263,17 @@ const columnsBase = ref<QTableProps["columns"]>([
|
|||
},
|
||||
]);
|
||||
|
||||
const columns = computed(() =>
|
||||
roleAdmin.value || checkPermission(route)?.attrOwnership == "OWNER"
|
||||
const columns = computed(() => {
|
||||
const permission = checkPermission(route);
|
||||
return roleAdmin.value || permission?.attrOwnership == "OWNER"
|
||||
? columnsBase.value
|
||||
: columnsBase.value?.filter(
|
||||
(col) =>
|
||||
col.name !== "no" &&
|
||||
col.name !== "draft" &&
|
||||
col.name !== "refCommandNo"
|
||||
)
|
||||
);
|
||||
);
|
||||
});
|
||||
|
||||
/**
|
||||
* แปลงสถานะพนักงาน
|
||||
|
|
@ -406,8 +422,9 @@ async function getTable() {
|
|||
rowsAll.value.push(rowData);
|
||||
});
|
||||
|
||||
const permission = checkPermission(route);
|
||||
const rowData = await (roleAdmin.value ||
|
||||
checkPermission(route)?.attrOwnership == "OWNER"
|
||||
permission?.attrOwnership == "OWNER"
|
||||
? rowsAll.value
|
||||
: rowsAll.value.filter((x: any) => x.isDraft === true));
|
||||
|
||||
|
|
@ -554,8 +571,9 @@ function getClass(val: boolean) {
|
|||
* @param draft status
|
||||
*/
|
||||
function selectData(pid: string, draft: string) {
|
||||
const permission = checkPermission(route);
|
||||
if (
|
||||
(roleAdmin.value || checkPermission(route)?.attrOwnership == "OWNER") &&
|
||||
(roleAdmin.value || permission?.attrOwnership == "OWNER") &&
|
||||
draft === "ส่งตัวแล้ว"
|
||||
) {
|
||||
personalId.value = pid;
|
||||
|
|
@ -858,34 +876,33 @@ async function filterRowsMain(type: string, pos: string) {
|
|||
});
|
||||
}
|
||||
|
||||
// Helper function รอให้ permissions load เสร็จ
|
||||
function waitForPermissions(): Promise<void> {
|
||||
return new Promise((resolve) => {
|
||||
const checkPermissions = () => {
|
||||
if (storeMenu.permissions) {
|
||||
resolve();
|
||||
} else {
|
||||
setTimeout(checkPermissions, 100); // เช็คทุก 100ms
|
||||
}
|
||||
};
|
||||
checkPermissions();
|
||||
});
|
||||
}
|
||||
|
||||
// ปรับปรุง getWorkFlow function
|
||||
async function getWorkFlow() {
|
||||
showLoader();
|
||||
|
||||
// รอให้ permissions load เสร็จก่อน
|
||||
await waitForPermissions();
|
||||
|
||||
await http
|
||||
.get(config.API.workflowKeycloakSystem("SYS_PLACEMENT_PASS"))
|
||||
.then(async (res) => {
|
||||
const data = await res.data.result;
|
||||
DataStore.isOfficer = data.isOfficer;
|
||||
DataStore.isStaff = data.isStaff;
|
||||
roleAdmin.value =
|
||||
data.isOfficer || checkPermission(route)?.attrOwnership == "OWNER";
|
||||
if (
|
||||
roleAdmin.value === false &&
|
||||
checkPermission(route)?.attrOwnership !== "OWNER"
|
||||
) {
|
||||
displayAdd.value = false;
|
||||
// visibleColumns.value = [
|
||||
// "position",
|
||||
// "fullName",
|
||||
// "examNumber",
|
||||
// "idCard",
|
||||
// "positionNumber",
|
||||
// "organizationName",
|
||||
// "reportingDate",
|
||||
// "bmaOfficer",
|
||||
// "statusName",
|
||||
// "positionCandidate",
|
||||
// ];
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -950,6 +967,28 @@ function onUpdateStatus(id: string) {
|
|||
);
|
||||
}
|
||||
|
||||
function onUpdateDraftStatus(id: string) {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
showLoader();
|
||||
try {
|
||||
await http.post(config.API.placementUpdateDraftStatus, {
|
||||
personalId: id,
|
||||
});
|
||||
await success($q, "บันทึกสำเร็จ");
|
||||
await getTable();
|
||||
} catch (error) {
|
||||
messageError($q, error);
|
||||
} finally {
|
||||
hideLoader();
|
||||
}
|
||||
},
|
||||
"ยืนยันการยกเลิกการส่งตัว",
|
||||
"ต้องการยกเลิกการส่งตัวรายชื่อนี้ใช่หรือไม่ ?"
|
||||
);
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await getWorkFlow();
|
||||
await getTable();
|
||||
|
|
@ -1012,6 +1051,30 @@ onMounted(async () => {
|
|||
</q-item-section>
|
||||
<q-item-section>รายละเอียด</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsUpdate &&
|
||||
props.row.isDraft &&
|
||||
props.row.statusId === 'PREPARE-CONTAIN' &&
|
||||
(DataStore.isOfficer || checkPermission($route)?.attrOwnership == 'OWNER')
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="onUpdateDraftStatus(props.row.personalId)"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-icon
|
||||
color="red"
|
||||
size="xs"
|
||||
name="mdi-account-arrow-left-outline"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>ยกเลิกการส่งตัว</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-item
|
||||
v-if="
|
||||
|
|
|
|||
|
|
@ -771,6 +771,7 @@ onMounted(async () => {
|
|||
<q-space />
|
||||
<div
|
||||
v-if="
|
||||
!checkRoutePermisson &&
|
||||
isStaff &&
|
||||
status === 'WAITTING' &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ const {
|
|||
dialogConfirm,
|
||||
} = useCounterMixin();
|
||||
|
||||
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailReject");
|
||||
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailreject");
|
||||
|
||||
/** ตัวแปร */
|
||||
const roleUser = ref<string>("");
|
||||
|
|
@ -439,7 +439,7 @@ onMounted(async () => {
|
|||
class="q-mr-sm"
|
||||
@click="router.push('/retirement/resign')"
|
||||
/>
|
||||
รายละเอียดการยกเลิกลาออก
|
||||
รายละเอียดการยกเลิกลาออก
|
||||
{{
|
||||
dataDetail.prefix + dataDetail.firstName + " " + dataDetail.lastName
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -801,6 +801,7 @@ onMounted(async () => {
|
|||
<q-space />
|
||||
<div
|
||||
v-if="
|
||||
!checkRoutePermisson &&
|
||||
isStaff &&
|
||||
status === 'WAITTING' &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ const router = useRouter();
|
|||
const store = useRetirementDataStore();
|
||||
const { fetchDataCheckIsoffice } = useRoleWorkflowDataStore();
|
||||
const { convertStatusText } = store;
|
||||
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailRejectEMP");
|
||||
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailrejectEMP");
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
messageError,
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ async function fetchDataRetirement() {
|
|||
firstNameTH: filter.value.firstNameTH.trim(),
|
||||
lastNameTH: filter.value.lastNameTH.trim(),
|
||||
});
|
||||
const data: RetirementOld = response.data.data;
|
||||
const data: RetirementOld = response.data.result;
|
||||
pagination.value.rowsNumber = data.totalRecords;
|
||||
rows.value = data.dataRecords;
|
||||
} catch (error) {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
field: "year",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format: (v) => v + 543,
|
||||
format: (v) => (v ? v + 543 : "-"),
|
||||
},
|
||||
{
|
||||
name: "receiveDate",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,491 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { FormDataProcess } from "@/modules/09_leave/interface/request/work";
|
||||
import type { DataProcess } from "@/modules/09_leave/interface/response/work";
|
||||
|
||||
import HeaderDialog from "@/components/DialogHeader.vue";
|
||||
|
||||
const $q = useQuasar();
|
||||
const {
|
||||
dialogConfirm,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
messageError,
|
||||
success,
|
||||
date2Thai,
|
||||
onSearchDataTable,
|
||||
convertDateToAPI,
|
||||
dialogRemove,
|
||||
} = useCounterMixin();
|
||||
|
||||
/** ข้อมูลตาราง*/
|
||||
const keyword = ref<string>("");
|
||||
const rowsMain = ref<DataProcess[]>([]);
|
||||
const rows = ref<DataProcess[]>([]);
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "no",
|
||||
align: "left",
|
||||
label: "ลำดับ",
|
||||
sortable: false,
|
||||
field: "no",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "startDate",
|
||||
align: "left",
|
||||
label: "วันเริ่มต้น",
|
||||
sortable: true,
|
||||
field: "startDate",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format(val, row) {
|
||||
return val ? date2Thai(val) : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "endDate",
|
||||
align: "left",
|
||||
label: "วันสิ้นสุด",
|
||||
sortable: true,
|
||||
field: "endDate",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format(val, row) {
|
||||
return val ? date2Thai(val) : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "processingDate",
|
||||
align: "left",
|
||||
label: "วันที่ประมวลผล",
|
||||
sortable: true,
|
||||
field: "processingDate",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format(val, row) {
|
||||
return val ? date2Thai(val, false, true) : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "completedDate",
|
||||
align: "left",
|
||||
label: "วันที่เสร็จสิ้น",
|
||||
sortable: true,
|
||||
field: "completedDate",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format(val, row) {
|
||||
return val ? date2Thai(val, false, true) : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "status",
|
||||
align: "left",
|
||||
label: "สถานะ",
|
||||
sortable: true,
|
||||
field: "status",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format(val, row) {
|
||||
return convertStatus(val);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "createdAt",
|
||||
align: "left",
|
||||
label: "วันที่สร้าง",
|
||||
sortable: true,
|
||||
field: "createdAt",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format(val, row) {
|
||||
return val ? date2Thai(val, false, true) : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "createdFullName",
|
||||
align: "left",
|
||||
label: "ผู้สร้าง",
|
||||
sortable: true,
|
||||
field: "createdFullName",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
const visibleColumns = ref<string[]>([
|
||||
"no",
|
||||
"startDate",
|
||||
"endDate",
|
||||
"processingDate",
|
||||
"completedDate",
|
||||
"status",
|
||||
"createdAt",
|
||||
"createdFullName",
|
||||
]);
|
||||
|
||||
const modal = ref<boolean>(false); // dialog
|
||||
const isEdit = ref<boolean>(false); // แก้ไขหรือเพิ่ม
|
||||
const editId = ref<string>(""); // id ที่จะแก้ไข
|
||||
const formData = reactive<FormDataProcess>({
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
});
|
||||
|
||||
/** ฟังก์ชันดึงข้อมูลจาก API */
|
||||
async function fetchData() {
|
||||
try {
|
||||
showLoader();
|
||||
// เรียก API เพื่อดึงข้อมูล
|
||||
const res = await http.get(`${config.API.leaveTask}`);
|
||||
rowsMain.value = res.data.result;
|
||||
serchDataTable();
|
||||
} catch (error) {
|
||||
messageError($q, error);
|
||||
} finally {
|
||||
hideLoader();
|
||||
}
|
||||
}
|
||||
|
||||
/** ฟังก์ชันค้นหาข้อมูลในตาราง */
|
||||
function serchDataTable() {
|
||||
rows.value = onSearchDataTable(
|
||||
keyword.value,
|
||||
rowsMain.value,
|
||||
columns.value ? columns.value : []
|
||||
);
|
||||
}
|
||||
|
||||
/** ฟังก์ชันเปิด dialog เพื่อเพิ่มข้อมูล */
|
||||
function handleOpenDialog() {
|
||||
modal.value = true;
|
||||
isEdit.value = false;
|
||||
}
|
||||
|
||||
/** ฟังก์ชันปิด dialog และรีเซ็ตข้อมูล */
|
||||
function handleCloseDialog() {
|
||||
modal.value = false;
|
||||
formData.startDate = null;
|
||||
formData.endDate = null;
|
||||
editId.value = "";
|
||||
}
|
||||
|
||||
/** ฟังก์ชันส่งข้อมูล */
|
||||
function onSubmit() {
|
||||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
|
||||
// สร้าง payload สำหรับส่งข้อมูลไปยัง API
|
||||
const payload = {
|
||||
startDate: convertDateToAPI(formData.startDate),
|
||||
endDate: convertDateToAPI(formData.endDate),
|
||||
};
|
||||
|
||||
//กำหนด URL และ method สำหรับเรียก API โดยตรวจสอบว่าเป็นการแก้ไขหรือเพิ่มข้อมูล
|
||||
const url = isEdit.value
|
||||
? `${config.API.leaveTask}/${editId.value}`
|
||||
: config.API.leaveTask;
|
||||
|
||||
// กำหนด method สำหรับเรียก API โดยตรวจสอบว่าเป็นการแก้ไขหรือเพิ่มข้อมูล
|
||||
const method = isEdit.value ? "put" : "post";
|
||||
|
||||
try {
|
||||
await http[method](url, payload);
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
fetchData();
|
||||
handleCloseDialog();
|
||||
} catch (error) {
|
||||
messageError($q, error);
|
||||
} finally {
|
||||
hideLoader();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** ฟังก์ชันตรวจสอบและอัปเดตวันที่สิ้นสุดให้เป็น null หากวันที่เริ่มต้นมากกว่าวันที่สิ้นสุด*/
|
||||
function updateDate() {
|
||||
if (
|
||||
formData.startDate &&
|
||||
formData.endDate &&
|
||||
new Date(formData.startDate) > new Date(formData.endDate)
|
||||
) {
|
||||
formData.endDate = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันแก้ไขข้อมูล
|
||||
* @param data ข้อมูลที่ต้องการแก้ไข
|
||||
*/
|
||||
function handleEdit(data: DataProcess) {
|
||||
isEdit.value = true;
|
||||
editId.value = data.id;
|
||||
formData.startDate = data.startDate;
|
||||
formData.endDate = data.endDate;
|
||||
modal.value = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันลบข้อมูล
|
||||
* @param id ที่ต้องการลบ
|
||||
*/
|
||||
function handleDelete(id: string) {
|
||||
dialogRemove($q, async () => {
|
||||
showLoader();
|
||||
try {
|
||||
await http.delete(`${config.API.leaveTask}/${id}`);
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
fetchData();
|
||||
} catch (error) {
|
||||
messageError($q, error);
|
||||
} finally {
|
||||
hideLoader();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันแปลงสถานะเป็นข้อความ
|
||||
* @param val
|
||||
*/
|
||||
function convertStatus(val: string) {
|
||||
switch (val) {
|
||||
case "PENDING":
|
||||
return "รอดำเนินการ";
|
||||
case "COMPLETED":
|
||||
return "ดำเนินการเสร็จสิ้น";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchData();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="row items-center q-gutter-x-sm q-pb-sm">
|
||||
<q-btn
|
||||
round
|
||||
dense
|
||||
flat
|
||||
color="primary"
|
||||
icon="add"
|
||||
@click="handleOpenDialog"
|
||||
>
|
||||
<q-tooltip>เพิ่มข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-space />
|
||||
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
v-model="keyword"
|
||||
label="ค้นหา"
|
||||
@keydown.enter.prevent="serchDataTable"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
<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"
|
||||
style="min-width: 140px"
|
||||
/>
|
||||
</div>
|
||||
<d-table
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
row-key="id"
|
||||
flat
|
||||
bordered
|
||||
:paging="true"
|
||||
dense
|
||||
class="custom-header-table"
|
||||
:visible-columns="visibleColumns"
|
||||
>
|
||||
<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"
|
||||
style="color: #000000; font-weight: 500"
|
||||
>
|
||||
<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 auto-width>
|
||||
<q-btn
|
||||
v-if="props.row.status === 'PENDING'"
|
||||
dense
|
||||
flat
|
||||
round
|
||||
color="edit"
|
||||
icon="edit"
|
||||
@click.stop.prevent="handleEdit(props.row)"
|
||||
>
|
||||
<q-tooltip>แก้ไข</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-if="props.row.status === 'PENDING'"
|
||||
dense
|
||||
flat
|
||||
round
|
||||
color="red"
|
||||
icon="delete"
|
||||
@click.stop.prevent="handleDelete(props.row.id)"
|
||||
>
|
||||
<q-tooltip>ลบ</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<div v-if="col.name == 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
|
||||
<q-dialog v-model="modal" persistent>
|
||||
<q-card style="width: 320px">
|
||||
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
||||
<HeaderDialog
|
||||
:tittle="'ประมวลผลการขาดราชการ/มาสาย'"
|
||||
:close="handleCloseDialog"
|
||||
/>
|
||||
|
||||
<q-separator />
|
||||
<q-card-section>
|
||||
<div class="row q-col-gutter-md">
|
||||
<div class="col-12">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="formData.startDate"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
@update:model-value="updateDate"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
</template>
|
||||
<template #year-overlay-value="{ value }">
|
||||
{{ parseInt(value + 543) }}
|
||||
</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
ref="dateRef"
|
||||
outlined
|
||||
dense
|
||||
hide-bottom-space
|
||||
:model-value="
|
||||
formData.startDate != null
|
||||
? date2Thai(formData.startDate)
|
||||
: null
|
||||
"
|
||||
label="วันที่เริ่มต้น"
|
||||
:rules="[
|
||||
(val:string) => !!val || `${'กรุณาเลือกวันที่เริ่มต้น'}`,
|
||||
]"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="formData.endDate"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
:min-date="formData.startDate"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
</template>
|
||||
<template #year-overlay-value="{ value }">
|
||||
{{ parseInt(value + 543) }}
|
||||
</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
ref="dateRef"
|
||||
outlined
|
||||
dense
|
||||
hide-bottom-space
|
||||
:model-value="
|
||||
formData.endDate != null
|
||||
? date2Thai(formData.endDate)
|
||||
: null
|
||||
"
|
||||
label="วันที่สิ้นสุด"
|
||||
:rules="[
|
||||
(val:string) => !!val || `${'กรุณาเลือกวันที่สิ้นสุด'}`,
|
||||
]"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
|
||||
<q-separator />
|
||||
<q-card-actions align="right">
|
||||
<q-btn color="secondary" label="บันทึก" type="submit" />
|
||||
</q-card-actions>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -27,7 +27,11 @@ const {
|
|||
convertDateToAPI,
|
||||
} = mixin;
|
||||
|
||||
const emit = defineEmits(["update:change-page"]);
|
||||
const emit = defineEmits(["update:change-page", "update:selected"]);
|
||||
|
||||
const isMultiple = defineModel<boolean>("isMultiple", {
|
||||
default: false,
|
||||
});
|
||||
|
||||
/**Props */
|
||||
const props = defineProps({
|
||||
|
|
@ -40,6 +44,10 @@ const props = defineProps({
|
|||
type: String,
|
||||
default: "",
|
||||
},
|
||||
selectedMultiple: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
|
||||
/**FormData */
|
||||
|
|
@ -118,18 +126,43 @@ function onSubmit() {
|
|||
async function changeRound() {
|
||||
const formattedDateForAPI = await convertDateToAPI(formData.effectiveDate);
|
||||
|
||||
const url =
|
||||
const urlAPI =
|
||||
props.type == "emp" ? config.API.leaveRoundEMP() : config.API.leaveRound();
|
||||
showLoader();
|
||||
await http
|
||||
.post(url, {
|
||||
|
||||
const urlFull = isMultiple.value ? urlAPI + `/multiple ` : urlAPI;
|
||||
let payload: any;
|
||||
if (isMultiple.value && props.selectedMultiple.length > 0) {
|
||||
payload = props.selectedMultiple.map((item: any) => ({
|
||||
profileId: item.profileId,
|
||||
roundId: formData.round,
|
||||
effectiveDate: formattedDateForAPI,
|
||||
remark: formData.reson,
|
||||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
prefix: item.prefix,
|
||||
rootDnaId: item.rootDnaId,
|
||||
child1DnaId: item.child1DnaId,
|
||||
child2DnaId: item.child2DnaId,
|
||||
child3DnaId: item.child3DnaId,
|
||||
child4DnaId: item.child4DnaId,
|
||||
}));
|
||||
} else {
|
||||
payload = {
|
||||
profileId: props.personId,
|
||||
roundId: formData.round,
|
||||
effectiveDate: formattedDateForAPI,
|
||||
remark: formData.reson,
|
||||
})
|
||||
};
|
||||
}
|
||||
await http
|
||||
.post(urlFull, payload)
|
||||
.then(() => {
|
||||
success($q, "บันทึกข้อมูลเปลี่ยนรอบเวลา");
|
||||
if (isMultiple.value) {
|
||||
emit("update:selected");
|
||||
isMultiple.value = false;
|
||||
}
|
||||
props.closeDialog?.();
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
@ -242,10 +275,10 @@ watch(
|
|||
? "เปลี่ยนรอบการปฏิบัติงาน"
|
||||
: "ประวัติการเปลี่ยนรอบการปฏิบัติงาน"
|
||||
}}
|
||||
<span class="text-teal-6">{{
|
||||
props.DataRow ? props.DataRow.fullName : ""
|
||||
}}</span></q-toolbar-title
|
||||
>
|
||||
<span class="text-teal-6" v-if="!isMultiple">
|
||||
{{ props.DataRow ? props.DataRow.fullName : "" }}
|
||||
</span>
|
||||
</q-toolbar-title>
|
||||
<q-btn
|
||||
icon="close"
|
||||
unelevated
|
||||
|
|
@ -259,7 +292,7 @@ watch(
|
|||
<q-separator />
|
||||
<q-card-section style="max-height: 50vh" class="scroll q-pa-none">
|
||||
<div class="q-pa-md">
|
||||
<div class="row">
|
||||
<div class="row" v-if="!isMultiple">
|
||||
<q-icon
|
||||
name="mdi-label-variant"
|
||||
class="cursor-pointer self-center"
|
||||
|
|
@ -267,12 +300,12 @@ watch(
|
|||
size="md"
|
||||
>
|
||||
</q-icon>
|
||||
<span class="self-center text-bold text-blue text-subtitle1"
|
||||
>รอบปัจจุบัน</span
|
||||
>
|
||||
<span class="self-center text-subtitle1 q-ml-sm">{{
|
||||
props.DataRow ? `${props.DataRow.currentRound} น.` : ""
|
||||
}}</span>
|
||||
<span class="self-center text-bold text-blue text-subtitle1">
|
||||
รอบปัจจุบัน
|
||||
</span>
|
||||
<span class="self-center text-subtitle1 q-ml-sm">
|
||||
{{ props.DataRow ? `${props.DataRow.currentRound} น.` : "" }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="row q-mt-sm q-col-gutter-sm">
|
||||
<div class="col-6">
|
||||
|
|
|
|||
|
|
@ -265,7 +265,6 @@ watch(modal, async (val) => {
|
|||
await Promise.all([
|
||||
filterLeaveTypeData(),
|
||||
isStatusEdit.value && defineDataLeaveBeginning(rowData.value),
|
||||
console.log(rowData.value),
|
||||
]);
|
||||
} finally {
|
||||
hideLoader();
|
||||
|
|
@ -463,6 +462,7 @@ watch(modal, async (val) => {
|
|||
outlined
|
||||
label="จำนวนสิทธิ์การลา"
|
||||
hide-bottom-space
|
||||
:rules="[(val: string) => !val || /^\d+(\.\d*)?$/.test(val) || 'กรุณากรอกเฉพาะตัวเลข']"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
|
|
@ -473,8 +473,7 @@ watch(modal, async (val) => {
|
|||
outlined
|
||||
label="ที่ใช้ไป (วัน)"
|
||||
hide-bottom-space
|
||||
mask="#"
|
||||
reverse-fill-mask
|
||||
:rules="[(val: string) => !val || /^\d+(\.\d*)?$/.test(val) || 'กรุณากรอกเฉพาะตัวเลข']"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
|
|
@ -498,8 +497,7 @@ watch(modal, async (val) => {
|
|||
outlined
|
||||
label="ยกมา (วัน)"
|
||||
hide-bottom-space
|
||||
mask="#"
|
||||
reverse-fill-mask
|
||||
:rules="[(val: string) => !val || /^\d+(\.\d*)?$/.test(val) || 'กรุณากรอกเฉพาะตัวเลข']"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ interface DataPost {
|
|||
lastName: string;
|
||||
page: number;
|
||||
pageSize: number;
|
||||
selectedNodeId: string | null;
|
||||
selectedNode: string;
|
||||
}
|
||||
|
||||
interface DataOption {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
interface FormDataProcess {
|
||||
startDate: Date | null;
|
||||
endDate: Date | null;
|
||||
}
|
||||
|
||||
export type { FormDataProcess };
|
||||
|
|
@ -85,4 +85,24 @@ interface FormDetail {
|
|||
checkInLocationName: string;
|
||||
checkOutLocationName: string;
|
||||
}
|
||||
export type { TableRows, DataResLog, DataResTime, TableRowsTime, FormDetail };
|
||||
|
||||
interface DataProcess {
|
||||
id: string;
|
||||
createdFullName: string;
|
||||
createdAt: Date | null;
|
||||
status: string;
|
||||
startDate: Date | null;
|
||||
endDate: Date | null;
|
||||
processingDate: Date | null;
|
||||
completedDate: Date | null;
|
||||
errorMessage: string | null;
|
||||
}
|
||||
|
||||
export type {
|
||||
TableRows,
|
||||
DataResLog,
|
||||
DataResTime,
|
||||
TableRowsTime,
|
||||
FormDetail,
|
||||
DataProcess,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ export const useChangeRoundDataStore = defineStore(
|
|||
|
||||
async function fetchDataForCardId(dataDetail: any, type?: string) {
|
||||
if (dataDetail) {
|
||||
showLoader();
|
||||
// showLoader();
|
||||
const url =
|
||||
type && type == "emp"
|
||||
? config.API.leaveSearchEMP()
|
||||
|
|
@ -138,6 +138,8 @@ export const useChangeRoundDataStore = defineStore(
|
|||
page: dataDetail.page, //หน้า
|
||||
pageSize: dataDetail.pageSize || 10, //จำนวนแถวต่อหน้า
|
||||
keyword: dataDetail.keyword || "", //keyword ค้นหา
|
||||
selectedNodeId: dataDetail.selectedNodeId, //id ต้นไม้ที่เลือก
|
||||
selectedNode: dataDetail.selectedNode, //ระดับต้นไม้ที่เลือก
|
||||
})
|
||||
.then((res) => {
|
||||
const apiData = res.data.result.data;
|
||||
|
|
@ -148,6 +150,7 @@ export const useChangeRoundDataStore = defineStore(
|
|||
if (apiData.length > 0) {
|
||||
checkCilck.value = false;
|
||||
rows.value = apiData.map((e: any) => ({
|
||||
...e,
|
||||
profileId: e.profileId,
|
||||
cardId: e.citizenId,
|
||||
fullName: e.fullName,
|
||||
|
|
@ -167,7 +170,7 @@ export const useChangeRoundDataStore = defineStore(
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
// hideLoader();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,26 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, toRefs } from "vue";
|
||||
import { computed, ref, toRefs } from "vue";
|
||||
|
||||
import { useWorklistDataStore } from "@/modules/09_leave/stores/WorkStore";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
/** import Components */
|
||||
import Tab1 from "@/modules/09_leave/components/02_WorkList/Tab1.vue";
|
||||
import Tab2 from "@/modules/09_leave/components/02_WorkList/Tab2.vue";
|
||||
import Tab3 from "@/modules/09_leave/components/02_WorkList/Tab3_Processed_Late.vue";
|
||||
|
||||
const stores = useWorklistDataStore();
|
||||
|
||||
const route = useRoute();
|
||||
const { tabs } = toRefs(stores);
|
||||
|
||||
const isPermissionTab3 = computed(() => {
|
||||
return (
|
||||
checkPermission(route)?.attrOwnership === "OWNER" ||
|
||||
(checkPermission(route)?.attrOwnership === "STAFF" &&
|
||||
checkPermission(route)?.attrIsUpdate)
|
||||
);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -30,6 +41,12 @@ const { tabs } = toRefs(stores);
|
|||
>
|
||||
<q-tab name="1" label="รายการลงเวลาที่ประมวลผลแล้ว" />
|
||||
<q-tab name="2" label="รายการลงเวลา" />
|
||||
<q-tab
|
||||
v-if="isPermissionTab3"
|
||||
name="3"
|
||||
label="ประมวลผลการขาดราชการ/มาสาย"
|
||||
/>
|
||||
<!-- เพิ่มแท็บใหม่ -->
|
||||
</q-tabs>
|
||||
|
||||
<q-separator />
|
||||
|
|
@ -42,6 +59,9 @@ const { tabs } = toRefs(stores);
|
|||
<q-tab-panel name="2">
|
||||
<Tab2 />
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="3">
|
||||
<Tab3 />
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</div>
|
||||
</q-card>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch, reactive, onMounted } from "vue";
|
||||
import { ref, watch, reactive, onMounted, nextTick } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
|
|
@ -7,22 +7,20 @@ import config from "@/app.config";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useChangeRoundDataStore } from "@/modules/09_leave/stores/ChangeRoundStore";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import { useStructureTree } from "@/stores/structureTree";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
import type { DataPost } from "@/modules/09_leave/interface/request/changeRound";
|
||||
|
||||
import Dialogform from "@/modules/09_leave/components/03_ChangeRound/DialogForm.vue";
|
||||
|
||||
/** useStore */
|
||||
const route = useRoute();
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
showLoader,
|
||||
hideLoader,
|
||||
success,
|
||||
messageError,
|
||||
dialogMessageNotify,
|
||||
dialogConfirm,
|
||||
} = mixin;
|
||||
|
||||
const { showLoader, hideLoader, success, messageError, dialogConfirm } = mixin;
|
||||
const dataStore = useChangeRoundDataStore();
|
||||
const { fetchStructureTree } = useStructureTree();
|
||||
|
||||
/** use */
|
||||
const $q = useQuasar();
|
||||
|
|
@ -37,9 +35,42 @@ const formData = reactive<DataPost>({
|
|||
firstName: "",
|
||||
lastName: "",
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 100,
|
||||
selectedNodeId: null,
|
||||
selectedNode: "",
|
||||
});
|
||||
|
||||
const pagination = ref({
|
||||
page: 1,
|
||||
rowsPerPage: 0,
|
||||
});
|
||||
|
||||
/** โครงสร้างข้อมูลต้นไม้ขององค์กร **/
|
||||
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);
|
||||
|
||||
/** client-side data & batch loading **/
|
||||
const allRows = ref<any[]>([]);
|
||||
const isLoadingAll = ref<boolean>(false);
|
||||
const loadAllProgress = ref<number>(0);
|
||||
const totalToLoad = ref<number | null>(null);
|
||||
const BATCH_SIZE = 250;
|
||||
|
||||
function waitForUi() {
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(resolve, 0);
|
||||
});
|
||||
}
|
||||
|
||||
/** function fetch ข้อมูลของ Tree*/
|
||||
async function fetchDataTree() {
|
||||
nodeTree.value = await fetchStructureTree(route.meta.Key as string, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function openPopup
|
||||
* @param check action edit,history
|
||||
|
|
@ -87,6 +118,7 @@ async function OpenmodalFix(detail: any) {
|
|||
function closeDialog() {
|
||||
modal.value = false;
|
||||
modalFix.value = false;
|
||||
isMultiple.value = false;
|
||||
}
|
||||
|
||||
function save() {
|
||||
|
|
@ -110,214 +142,415 @@ function save() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* function updatePagination
|
||||
* @param newPagination ข้อมูล Pagination ใหม่
|
||||
*/
|
||||
function updatePagination(newPagination: any) {
|
||||
formData.pageSize = newPagination.rowsPerPage;
|
||||
/** Function โหลดข้อมูลทั้งหมดแบบ batch แล้วให้ QTable ทำ pagination เอง */
|
||||
async function fetchAllData() {
|
||||
isLoadingAll.value = true;
|
||||
allRows.value = [];
|
||||
loadAllProgress.value = 0;
|
||||
totalToLoad.value = null;
|
||||
selected.value = [];
|
||||
|
||||
// ให้ UI แสดงสถานะกำลังโหลดทันที ก่อนรอผล API แรก
|
||||
await nextTick();
|
||||
await waitForUi();
|
||||
|
||||
try {
|
||||
await dataStore.fetchDataForCardId({
|
||||
...formData,
|
||||
page: 1,
|
||||
pageSize: BATCH_SIZE,
|
||||
});
|
||||
allRows.value = dataStore.rows.slice();
|
||||
|
||||
const total = dataStore.totalListMain;
|
||||
totalToLoad.value = total;
|
||||
const totalPages = Math.ceil(total / BATCH_SIZE);
|
||||
loadAllProgress.value =
|
||||
totalPages <= 1 ? 100 : Math.round(100 / totalPages);
|
||||
await nextTick();
|
||||
|
||||
for (let page = 2; page <= totalPages; page++) {
|
||||
await dataStore.fetchDataForCardId({
|
||||
...formData,
|
||||
page,
|
||||
pageSize: BATCH_SIZE,
|
||||
});
|
||||
allRows.value.push(...dataStore.rows);
|
||||
loadAllProgress.value = Math.round((page / totalPages) * 100);
|
||||
await nextTick();
|
||||
await waitForUi();
|
||||
}
|
||||
} finally {
|
||||
isLoadingAll.value = false;
|
||||
totalToLoad.value = null;
|
||||
}
|
||||
}
|
||||
|
||||
/** Function ค้นหาข้อมูล */
|
||||
async function searchData() {
|
||||
if (formData.cardId || formData.firstName || formData.lastName) {
|
||||
await dataStore.fetchDataForCardId(formData);
|
||||
} else {
|
||||
dialogMessageNotify($q, "กรุณากรอกข้อมูลอย่างน้อย 1 ช่อง");
|
||||
}
|
||||
await fetchAllData();
|
||||
}
|
||||
|
||||
function submitSearchByEnter() {
|
||||
if (isLoadingAll.value) return;
|
||||
if (!checkPermission(route)?.attrIsGet) return;
|
||||
formData.page = 1;
|
||||
searchData();
|
||||
}
|
||||
|
||||
/** Function เลือกทั้งหมด */
|
||||
function selectAllRows() {
|
||||
selected.value = [...allRows.value];
|
||||
}
|
||||
|
||||
function onSelectedOrgTree(data: any) {
|
||||
if (isLoadingAll.value) return;
|
||||
selected.value = [];
|
||||
allRows.value = [];
|
||||
orgTreeId.value = data.orgTreeId;
|
||||
formData.selectedNodeId = data.orgTreeDnaId;
|
||||
formData.selectedNode = data.orgLevel;
|
||||
formData.page = 1;
|
||||
}
|
||||
|
||||
function handleSelectMultiple() {
|
||||
modal.value = true;
|
||||
isMultiple.value = true;
|
||||
editCheck.value = "edit";
|
||||
}
|
||||
|
||||
function resetSelected() {
|
||||
selected.value = [];
|
||||
}
|
||||
|
||||
watch(
|
||||
() => formData.pageSize,
|
||||
() => {
|
||||
formData.page = 1;
|
||||
searchData();
|
||||
// pageSize ถูกควบคุมโดย QTable (client-side) ไม่ต้อง fetch API ใหม่
|
||||
}
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
fetchDataTree();
|
||||
dataStore.rows = [];
|
||||
allRows.value = [];
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
<div class="toptitle text-dark col-12 row items-center">
|
||||
เปลี่ยนแปลงรอบการปฏิบัติงานของข้าราชการ
|
||||
</div>
|
||||
<q-card flat bordered class="col-12 q-mt-sm q-pa-md">
|
||||
<div class="row col-12 q-mb-sm">
|
||||
<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">
|
||||
ค้นหารายชื่อ
|
||||
|
||||
<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>
|
||||
</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"
|
||||
<div class="bg-white tree-container q-pa-xs">
|
||||
<q-tree
|
||||
class="q-pa-sm q-gutter-sm"
|
||||
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
|
||||
:nodes="nodeTree"
|
||||
node-key="orgTreeId"
|
||||
label-key="labelName"
|
||||
:filter="filter.trim()"
|
||||
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
||||
no-nodes-label="ไม่มีข้อมูล"
|
||||
v-model:expanded="expanded"
|
||||
>
|
||||
<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>
|
||||
</div>
|
||||
</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"
|
||||
>
|
||||
<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 || isLoadingAll"
|
||||
v-model="formData.cardId"
|
||||
outlined
|
||||
label="เลขประจำตัวประชาชน"
|
||||
class="col-6 col-md-4 bg-white inputgreen"
|
||||
dense
|
||||
hide-bottom-space
|
||||
maxlength="13"
|
||||
@keyup.enter="submitSearchByEnter"
|
||||
/>
|
||||
<q-input
|
||||
:readonly="!checkPermission($route)?.attrIsGet || isLoadingAll"
|
||||
v-model="formData.firstName"
|
||||
outlined
|
||||
label="ชื่อ"
|
||||
class="col-5 col-md-3 bg-white inputgreen"
|
||||
dense
|
||||
hide-bottom-space
|
||||
@keyup.enter="submitSearchByEnter"
|
||||
/>
|
||||
<q-input
|
||||
:readonly="!checkPermission($route)?.attrIsGet || isLoadingAll"
|
||||
v-model="formData.lastName"
|
||||
outlined
|
||||
label="นามสกุล"
|
||||
class="col-6 col-md-3 bg-white inputgreen"
|
||||
dense
|
||||
hide-bottom-space
|
||||
@keyup.enter="submitSearchByEnter"
|
||||
/>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
@click="(formData.page = 1), searchData()"
|
||||
:disable="isLoadingAll"
|
||||
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="
|
||||
allRows.length === 0 &&
|
||||
dataStore.checkCilck === true &&
|
||||
!isLoadingAll
|
||||
"
|
||||
>
|
||||
<q-card
|
||||
flat
|
||||
bordered
|
||||
class="bg-grey-2 col-12 q-pa-lg text-center text-subtitle1 text-bold"
|
||||
>ไม่พบข้อมูล</q-card
|
||||
>
|
||||
</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 q-mt-xl">
|
||||
<d-table
|
||||
ref="table"
|
||||
:columns="dataStore.columns"
|
||||
:rows="dataStore.rows"
|
||||
row-key="interrogated"
|
||||
flat
|
||||
bordered
|
||||
dense
|
||||
class="custom-header-table"
|
||||
:visible-columns="dataStore.visibleColumns"
|
||||
:rows-per-page-options="[10, 25, 50, 100]"
|
||||
@update:pagination="updatePagination"
|
||||
>
|
||||
<!-- :paging="true" -->
|
||||
<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"
|
||||
style="color: #000000; font-weight: 500"
|
||||
>
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props">
|
||||
<q-td>
|
||||
<div>
|
||||
<q-btn
|
||||
flat
|
||||
icon="mdi-dots-horizontal-circle-outline"
|
||||
color="secondary"
|
||||
for="#cancel"
|
||||
dense
|
||||
round
|
||||
<div v-if="allRows.length !== 0 || isLoadingAll" class="col-12">
|
||||
<q-banner
|
||||
v-if="isLoadingAll"
|
||||
rounded
|
||||
class="bg-blue-1 text-primary q-mb-sm"
|
||||
>
|
||||
<div class="row items-center q-gutter-sm">
|
||||
<q-spinner color="primary" size="22px" />
|
||||
<div v-if="totalToLoad === null || totalToLoad <= 500">
|
||||
กำลังค้นหาข้อมูล กรุณารอสักครู่
|
||||
</div>
|
||||
<div v-else>
|
||||
กำลังโหลดข้อมูลจำนวนมาก กรุณารอสักครู่
|
||||
<div class="text-caption text-grey-7">
|
||||
ระบบกำลังดึงข้อมูลทั้งหมด
|
||||
{{ totalToLoad.toLocaleString() }} รายการ
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-banner>
|
||||
<q-linear-progress
|
||||
v-if="isLoadingAll && totalToLoad === null"
|
||||
indeterminate
|
||||
color="primary"
|
||||
class="q-mb-xs"
|
||||
/>
|
||||
<q-linear-progress
|
||||
v-if="isLoadingAll && totalToLoad !== null"
|
||||
:value="loadAllProgress / 100"
|
||||
color="primary"
|
||||
class="q-mb-xs"
|
||||
/>
|
||||
<div
|
||||
v-if="isLoadingAll && totalToLoad !== null"
|
||||
class="text-caption text-grey-6 q-mb-xs"
|
||||
>
|
||||
กำลังโหลด... {{ allRows.length.toLocaleString() }} /
|
||||
{{ totalToLoad.toLocaleString() }} รายการ
|
||||
</div>
|
||||
<div class="row justify-between items-center q-mb-sm">
|
||||
<div class="row q-gutter-sm">
|
||||
<!-- <q-btn
|
||||
color="secondary"
|
||||
dense
|
||||
icon="mdi-checkbox-multiple-marked-outline"
|
||||
label="เลือกทั้งหมด"
|
||||
:disable="isLoadingAll || allRows.length === 0"
|
||||
@click="selectAllRows()"
|
||||
/> -->
|
||||
<q-btn
|
||||
:disable="selected.length === 0 || isLoadingAll"
|
||||
:color="selected.length === 0 ? 'grey' : 'info'"
|
||||
dense
|
||||
icon="mdi-shuffle-variant"
|
||||
:label="`เปลี่ยนรอบการลงเวลา${
|
||||
selected.length > 0 ? ` (${selected.length})` : ''
|
||||
}`"
|
||||
@click="handleSelectMultiple()"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<d-table
|
||||
ref="table"
|
||||
:columns="dataStore.columns"
|
||||
:rows="allRows"
|
||||
row-key="profileId"
|
||||
flat
|
||||
bordered
|
||||
dense
|
||||
virtual-scroll
|
||||
table-style="max-height: 58vh"
|
||||
class="custom-header-table"
|
||||
:visible-columns="dataStore.visibleColumns"
|
||||
hide-pagination
|
||||
v-model:pagination="pagination"
|
||||
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
|
||||
:disable="isLoadingAll"
|
||||
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"
|
||||
>
|
||||
<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>
|
||||
<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
|
||||
:disable="isLoadingAll"
|
||||
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>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<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-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>
|
||||
</d-table>
|
||||
<div class="text-caption text-grey-7 q-mt-sm">
|
||||
ทั้งหมด {{ allRows.length }} รายการ
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
||||
<!-- popup เปลี่ยนรอบการปฏิบัติงาน ,ประวัติการเปลี่ยนรอบการปฏิบัติงาน -->
|
||||
|
|
@ -328,6 +561,9 @@ onMounted(() => {
|
|||
:DataRow="DataRow"
|
||||
:personId="DataRow == null ? '' : DataRow.profileId"
|
||||
@update:change-page="dataStore.changePage"
|
||||
v-model:isMultiple="isMultiple"
|
||||
:selectedMultiple="selected"
|
||||
@update:selected="resetSelected"
|
||||
/>
|
||||
|
||||
<!-- แก้ไขปฏิทินวันทำงาน -->
|
||||
|
|
@ -384,4 +620,19 @@ onMounted(() => {
|
|||
.q-table tbody td:before.no-background {
|
||||
background: none;
|
||||
}
|
||||
|
||||
.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);
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -269,6 +269,7 @@ async function fetchLeaveday(
|
|||
* @param data ข้อมูลบัญชีวันลา
|
||||
*/
|
||||
async function fetchDocumentTemplate(data: any) {
|
||||
if (typeReport.value === 4) return;
|
||||
await axios
|
||||
.post(`${config.API.reportTemplate}/xlsx`, data, {
|
||||
headers: {
|
||||
|
|
@ -352,7 +353,7 @@ function clearData() {
|
|||
};
|
||||
}
|
||||
|
||||
function onSearch() {
|
||||
async function onSearch() {
|
||||
isReport.value = false;
|
||||
isLoadPDF.value = true;
|
||||
pdfSrc.value = undefined;
|
||||
|
|
@ -467,6 +468,19 @@ const reportName = () => {
|
|||
return reportNameVal + employeeClassName;
|
||||
};
|
||||
|
||||
async function handleDownload() {
|
||||
updateLeaveday();
|
||||
await fetchLeaveday(
|
||||
employeeClass.value,
|
||||
typeReport.value == 3 || typeReport.value == 4
|
||||
? leaveType.value
|
||||
: yearType.value,
|
||||
dateStart.value,
|
||||
dateEnd.value
|
||||
);
|
||||
await genReportXLSX(detailReport.value, `${reportName()}`);
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchDataTree();
|
||||
});
|
||||
|
|
@ -512,7 +526,11 @@ onMounted(() => {
|
|||
round
|
||||
color="primary"
|
||||
icon="download"
|
||||
v-if="checkPermission($route)?.attrIsGet && typeReport !== 3"
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsGet &&
|
||||
typeReport !== 3 &&
|
||||
typeReport !== 4
|
||||
"
|
||||
>
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
|
|
@ -547,8 +565,11 @@ onMounted(() => {
|
|||
round
|
||||
color="primary"
|
||||
icon="download"
|
||||
v-if="checkPermission($route)?.attrIsGet && typeReport == 3"
|
||||
@click="getReport()"
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsGet &&
|
||||
(typeReport == 3 || typeReport == 4)
|
||||
"
|
||||
@click="typeReport == 3 ? getReport() : handleDownload()"
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
|
@ -957,7 +978,7 @@ onMounted(() => {
|
|||
<q-separator />
|
||||
<q-card-actions align="right">
|
||||
<q-btn
|
||||
v-if="typeReport !== 3"
|
||||
v-if="typeReport !== 3 && typeReport !== 4"
|
||||
dense
|
||||
class="q-px-md"
|
||||
label="ค้นหา"
|
||||
|
|
@ -976,7 +997,7 @@ onMounted(() => {
|
|||
</div>
|
||||
<div class="col-lg-9 col-md-9 col-sm-9 col-xs-12 col-xs-12 flex">
|
||||
<q-splitter
|
||||
v-if="typeReport !== 3"
|
||||
v-if="typeReport !== 3 && typeReport !== 4"
|
||||
disable
|
||||
v-model="splitterModel"
|
||||
horizontal
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import config from "@/app.config";
|
|||
|
||||
/** importType*/
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { Director } from "@/modules/11_discipline/interface/request/Disciplinary";
|
||||
import type { Director } from "@/modules/11_discipline/interface/request/disciplinary";
|
||||
import type { Directors } from "@/modules/12_evaluatePersonal/interface/response/Main";
|
||||
|
||||
/** importComponents*/
|
||||
|
|
@ -20,7 +20,14 @@ import DialogDuty from "@/modules/12_evaluatePersonal/components/Detail/viewTab2
|
|||
const $q = useQuasar();
|
||||
const route = useRoute();
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, hideLoader, messageError, dialogConfirm, success } = mixin;
|
||||
const {
|
||||
showLoader,
|
||||
hideLoader,
|
||||
messageError,
|
||||
dialogConfirm,
|
||||
success,
|
||||
dialogRemove,
|
||||
} = mixin;
|
||||
|
||||
const props = defineProps({
|
||||
data: {
|
||||
|
|
@ -201,6 +208,21 @@ function onEditDuty(data: Director) {
|
|||
modalDuty.value = true;
|
||||
}
|
||||
|
||||
function handleDelete(id: string) {
|
||||
dialogRemove($q, async () => {
|
||||
showLoader();
|
||||
try {
|
||||
await http.delete(config.API.evaluationMain() + `/del-director/${id}`);
|
||||
await props.fetchData();
|
||||
await success($q, "ลบสำเร็จ");
|
||||
} catch (error) {
|
||||
messageError($q, error);
|
||||
} finally {
|
||||
hideLoader();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ทำงานเมื่อ props.data มีการเปลี่ยนแปลง
|
||||
*/
|
||||
|
|
@ -268,17 +290,30 @@ watch(
|
|||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props">
|
||||
<q-td>
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
flat
|
||||
round
|
||||
denes
|
||||
dense
|
||||
icon="edit"
|
||||
color="edit"
|
||||
@click.stop.prevent="onEditDuty(props.row)"
|
||||
>
|
||||
<q-tooltip>แก้ไขหน้าที่</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsDelete"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="delete"
|
||||
color="red"
|
||||
@click="handleDelete(props.row.id)"
|
||||
>
|
||||
<q-tooltip>ลบ</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<div v-if="col.name == 'no'">
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ const {
|
|||
dialogConfirm,
|
||||
date2Thai,
|
||||
success,
|
||||
dialogRemove,
|
||||
} = mixin;
|
||||
|
||||
/** props*/
|
||||
|
|
@ -208,6 +209,23 @@ async function getList() {
|
|||
});
|
||||
}
|
||||
|
||||
function handleDelete(meetingId: string) {
|
||||
dialogRemove($q, async () => {
|
||||
showLoader();
|
||||
try {
|
||||
await http.delete(
|
||||
config.API.evaluationMain() + `/del-meeting/${id.value}/${meetingId}`
|
||||
);
|
||||
await props.fetchData();
|
||||
await success($q, "ลบสำเร็จ");
|
||||
} catch (error) {
|
||||
messageError($q, error);
|
||||
} finally {
|
||||
hideLoader();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.data,
|
||||
() => {
|
||||
|
|
@ -265,6 +283,7 @@ watch(
|
|||
>
|
||||
<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>
|
||||
|
|
@ -272,6 +291,19 @@ watch(
|
|||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props">
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="delete"
|
||||
color="red"
|
||||
@click="handleDelete(props.row.id)"
|
||||
>
|
||||
<q-tooltip>ลบ</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<div v-if="col.name == 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
|
|
|
|||
|
|
@ -222,6 +222,7 @@ const itemsCard = ref([
|
|||
* @param id กลุ่ม
|
||||
*/
|
||||
async function fetchDataQuota(id: string) {
|
||||
if (!id) return;
|
||||
await http
|
||||
.get(config.API.salaryListPeriodQuota(id))
|
||||
.then((res) => {
|
||||
|
|
@ -254,6 +255,7 @@ async function fetchDataQuota(id: string) {
|
|||
* @param id กลุ่ม
|
||||
*/
|
||||
async function fetchDataPeriod(id: string, force: boolean = false) {
|
||||
if (!id) return;
|
||||
force && showLoader();
|
||||
let formData = {
|
||||
...params.value,
|
||||
|
|
|
|||
|
|
@ -215,6 +215,7 @@ const itemsCard = ref([
|
|||
* @param id กลุ่ม
|
||||
*/
|
||||
async function fetchDataQuota(id: string) {
|
||||
if (!id) return;
|
||||
await http
|
||||
.get(config.API.salaryListPeriodQuotaEmp(id))
|
||||
.then((res) => {
|
||||
|
|
@ -246,6 +247,7 @@ async function fetchDataQuota(id: string) {
|
|||
* @param id กลุ่ม
|
||||
*/
|
||||
async function fetchDataPeriod(id: string, force: boolean = false) {
|
||||
if (!id) return;
|
||||
force && showLoader();
|
||||
let formData = {
|
||||
...params.value,
|
||||
|
|
|
|||
|
|
@ -308,6 +308,7 @@ async function fetchSalalyPeriod(
|
|||
if (!data.group1id) {
|
||||
hideLoader();
|
||||
}
|
||||
isLoad.value = data.group1id ? true : false;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
field: "year",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format: (val) => val + 543,
|
||||
format: (val) => (val ? val + 543 : "-"),
|
||||
},
|
||||
{
|
||||
name: "durationKPI",
|
||||
|
|
|
|||
|
|
@ -876,43 +876,6 @@ onMounted(() => {
|
|||
</div>
|
||||
</q-form>
|
||||
|
||||
<q-card flat bordered>
|
||||
<q-card-section class="q-gutter-y-sm">
|
||||
<q-toolbar style="padding: 0">
|
||||
<div class="row q-gutter-sm"></div>
|
||||
|
||||
<q-space />
|
||||
</q-toolbar>
|
||||
<q-toolbar
|
||||
class="q-pa-sm bg-grey-2"
|
||||
style="padding: 0; border-radius: 5px"
|
||||
v-if="typeReport"
|
||||
>
|
||||
<div
|
||||
class="row q-gutter-sm"
|
||||
v-if="
|
||||
typeReport === 'KPI1' ||
|
||||
typeReport === 'KPI2' ||
|
||||
typeReport === 'KPI3' ||
|
||||
typeReport === 'KPI7' ||
|
||||
typeReport === 'KPI8' ||
|
||||
typeReport === 'KPI9'
|
||||
"
|
||||
></div>
|
||||
|
||||
<div
|
||||
class="q-pa-sm"
|
||||
v-if="
|
||||
typeReport === 'KPI4' ||
|
||||
typeReport === 'KPI5' ||
|
||||
typeReport === 'KPI6' ||
|
||||
typeReport === 'KPI8'
|
||||
"
|
||||
></div>
|
||||
</q-toolbar>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
||||
<q-dialog v-model="modal" persistent>
|
||||
<q-card style="width: 1000px; max-width: 100vw">
|
||||
<DialogHeader :tittle="'เลือกราชชื่อ'" :close="onCloseModal" />
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
field: "year",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format: (v) => v + 543,
|
||||
format: (v) => (v ? v + 543 : "-"),
|
||||
},
|
||||
{
|
||||
name: "citizenId",
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
field: "year",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format: (v) => v + 543,
|
||||
format: (v) => (v ? v + 543 : "-"),
|
||||
},
|
||||
{
|
||||
name: "citizenId",
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
field: "year",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px ; width:10%",
|
||||
format: (val) => val + 543,
|
||||
format: (val) => (val ? val + 543 : "-"),
|
||||
},
|
||||
{
|
||||
name: "projectName",
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format(val) {
|
||||
return val + 543;
|
||||
return val ? val + 543 : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { usePagination } from "@/composables/usePagination";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
import type { DataOption } from "@/modules/18_command/interface/index/Main";
|
||||
import type { DataProfile} from "@/modules/18_command/interface/response/Main";
|
||||
import type { DataProfile } from "@/modules/18_command/interface/response/Main";
|
||||
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
|
|
@ -68,7 +68,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
{
|
||||
name: "posNo",
|
||||
align: "left",
|
||||
label: "เลขที่ตำแหน่ง",
|
||||
|
|
@ -77,7 +77,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
{
|
||||
name: "position",
|
||||
align: "left",
|
||||
label: "ตำแหน่งในสายงาน",
|
||||
|
|
@ -86,7 +86,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
{
|
||||
name: "positionType",
|
||||
align: "left",
|
||||
label: "ประเภทตำแหน่ง",
|
||||
|
|
@ -96,7 +96,9 @@ const columns = ref<QTableProps["columns"]>([
|
|||
style: "font-size: 14px",
|
||||
format(val, row) {
|
||||
return row.posTypeName
|
||||
? `${row.posTypeName} ${row.positionLevelName ? `(${row.positionLevelName})` : ""}`
|
||||
? `${row.posTypeName} ${
|
||||
row.positionLevelName ? `(${row.positionLevelName})` : ""
|
||||
}`
|
||||
: "-";
|
||||
},
|
||||
},
|
||||
|
|
@ -119,7 +121,7 @@ async function fetchDataPerson() {
|
|||
{
|
||||
fieldName: type.value,
|
||||
keyword: keyword.value.trim(),
|
||||
system: (route.meta?.Key as string) || 'COMMAND',
|
||||
system: (route.meta?.Key as string) || "COMMAND",
|
||||
},
|
||||
{
|
||||
params: params.value,
|
||||
|
|
@ -137,7 +139,7 @@ async function fetchDataPerson() {
|
|||
|
||||
function onSubmit() {
|
||||
if (selected.value.length == 0) {
|
||||
dialogMessageNotify($q, "กรุณาเลือกบุคคลที่ต้องการหมอบหมายคำสั่ง");
|
||||
dialogMessageNotify($q, "กรุณาเลือกบุคคลที่ต้องการมอบหมายคำสั่ง");
|
||||
return;
|
||||
}
|
||||
dialogConfirm($q, async () => {
|
||||
|
|
@ -148,7 +150,7 @@ function onSubmit() {
|
|||
});
|
||||
await props.fetchListCommand();
|
||||
handleClose();
|
||||
success($q, "หมอบหมายคำสั่งสำเร็จ");
|
||||
success($q, "มอบหมายคำสั่งสำเร็จ");
|
||||
} catch (error) {
|
||||
messageError($q, error);
|
||||
} finally {
|
||||
|
|
@ -180,7 +182,7 @@ watch(modal, (newVal) => {
|
|||
<template>
|
||||
<q-dialog v-model="modal" persistent>
|
||||
<q-card style="width: 50vw; max-width: 50vw">
|
||||
<DialogHeader tittle="หมอบหมายคำสั่ง" :close="handleClose" />
|
||||
<DialogHeader tittle="มอบหมายคำสั่ง" :close="handleClose" />
|
||||
<q-separator />
|
||||
<q-card-section style="max-height: 60vh">
|
||||
<div class="row q-col-gutter-md">
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ onMounted(() => {
|
|||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<!-- หมอบหมายคำสั่ง -->
|
||||
<!-- มอบหมายคำสั่ง -->
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
|
|
@ -262,7 +262,7 @@ onMounted(() => {
|
|||
size="xs"
|
||||
name="mdi-account-check"
|
||||
/>
|
||||
<div class="q-pl-md">หมอบหมายคำสั่ง</div>
|
||||
<div class="q-pl-md">มอบหมายคำสั่ง</div>
|
||||
</div>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import { onMounted, reactive, ref, computed } from "vue";
|
||||
import { useQuasar, type QTableProps } from "quasar";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
|
|
@ -25,6 +25,7 @@ const {
|
|||
dialogConfirm,
|
||||
convertDateToAPI,
|
||||
dialogRemove,
|
||||
dialogMessageNotify,
|
||||
} = useCounterMixin();
|
||||
|
||||
/**
|
||||
|
|
@ -37,6 +38,12 @@ const props = defineProps({
|
|||
formCommandList: { type: Object, required: true },
|
||||
});
|
||||
|
||||
const isCanDelete = computed(
|
||||
() => (role: string) =>
|
||||
rows.value.filter((row) => row.roleName === "เจ้าหน้าที่ดำเนินการ")
|
||||
.length === 1 && role === "เจ้าหน้าที่ดำเนินการ"
|
||||
); //เช็คสามารถลบรายชื่อผู้ลงนามในแนบท้ายคำสั่ง ได้หรือไม่
|
||||
|
||||
const commandId = ref<string>(route.params.id.toString()); //ID คำสั่ง
|
||||
const commandCode = ref<string>(""); //รหัสคำสั่ง
|
||||
const createdUserId = ref<string>(""); //ID ผู้สร้างคำสั่ง
|
||||
|
|
@ -54,7 +61,6 @@ let formData = reactive<FormDataDetail>({
|
|||
});
|
||||
const commandVolume = ref<string>(""); //เล่มที่
|
||||
const commandChapter = ref<string>(""); //ตอนที่
|
||||
const isIdofficer = ref<boolean>(false); //เช็ค สกจ.
|
||||
|
||||
const rows = ref<Array<DataOperators>>([]);
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
|
|
@ -107,23 +113,22 @@ const visibleColumns = ref<Array<string>>([
|
|||
|
||||
const modalAddOperator = ref<boolean>(false); // แสดงเพิ่มรายชื่อลงนามในแนบท้ายคำสั่ง
|
||||
|
||||
/** ฟังก์ชันเช็ค สกจ.*/
|
||||
async function fetchCheckIdofficer() {
|
||||
await http
|
||||
.get(config.API.checkIdofficer)
|
||||
.then((res) => {
|
||||
isIdofficer.value = res.data.result;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* ฟังก์ชันบันทึกข้อมูลรายละเอียดคำสั่ง
|
||||
* และกำหนด isChangeData เป็น false
|
||||
*/
|
||||
async function onSubmit() {
|
||||
//ถ้าเป็น สกจ. ต้องเลือกประเภทคำสั่งด้วย
|
||||
if (
|
||||
store.isIdofficer &&
|
||||
formData.isBangkok !== "BANGKOK" &&
|
||||
formData.isBangkok !== "OFFICE"
|
||||
) {
|
||||
dialogMessageNotify($q, "กรุณาเลือกคำสั่ง");
|
||||
return;
|
||||
}
|
||||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -150,7 +155,7 @@ async function onSubmit() {
|
|||
});
|
||||
}
|
||||
|
||||
/** ฟังกชันดึงข้อมูลรายชื่อเจ้าหน้าที่ดำเนินการ */
|
||||
/** ฟังก์ชันดึงข้อมูลรายชื่อเจ้าหน้าที่ดำเนินการ */
|
||||
async function fetchDataOperatorList() {
|
||||
try {
|
||||
const res = await http.get(
|
||||
|
|
@ -209,7 +214,6 @@ function onDeleteData(id: string) {
|
|||
onMounted(async () => {
|
||||
try {
|
||||
showLoader();
|
||||
await fetchCheckIdofficer();
|
||||
await fetchDataOperatorList();
|
||||
formData.commandNo = props.formCommandList.commandNo;
|
||||
formData.commandYear = props.formCommandList.commandYear;
|
||||
|
|
@ -219,7 +223,7 @@ onMounted(async () => {
|
|||
formData.issue = props.formCommandList.issue;
|
||||
formData.commandAffectDate = props.formCommandList.commandAffectDate;
|
||||
formData.commandExcecuteDate = props.formCommandList.commandExcecuteDate;
|
||||
formData.isBangkok = !isIdofficer.value
|
||||
formData.isBangkok = !store.isIdofficer
|
||||
? null
|
||||
: props.formCommandList.isBangkok;
|
||||
commandCode.value = props.formCommandList.commandCode;
|
||||
|
|
@ -484,7 +488,7 @@ onMounted(async () => {
|
|||
|
||||
<div
|
||||
class="col-12 q-gutter-sm"
|
||||
v-if="isIdofficer && commandCode !== 'C-PM-47'"
|
||||
v-if="store.isIdofficer && commandCode !== 'C-PM-47'"
|
||||
>
|
||||
<q-radio
|
||||
:disable="store.readonly"
|
||||
|
|
@ -597,14 +601,12 @@ onMounted(async () => {
|
|||
<q-btn
|
||||
icon="mdi-delete"
|
||||
:color="
|
||||
props.row.roleName === 'เจ้าหน้าที่ดำเนินการ'
|
||||
? 'grey'
|
||||
: 'red'
|
||||
isCanDelete(props.row.roleName) ? 'grey' : 'red'
|
||||
"
|
||||
flat
|
||||
dense
|
||||
round
|
||||
:disable="props.row.roleName === 'เจ้าหน้าที่ดำเนินการ'"
|
||||
:disable="isCanDelete(props.row.roleName)"
|
||||
@click.prevent.stop="onDeleteData(props.row.id)"
|
||||
>
|
||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||
|
|
|
|||
|
|
@ -292,7 +292,10 @@ function onConfirmOrder() {
|
|||
if (
|
||||
store?.dataCommand?.commandNo !== "" &&
|
||||
store?.dataCommand?.commandAffectDate !== null &&
|
||||
store?.dataCommand?.commandExcecuteDate !== null
|
||||
store?.dataCommand?.commandExcecuteDate !== null &&
|
||||
(!store.isIdofficer ||
|
||||
store?.dataCommand?.isBangkok === "BANGKOK" ||
|
||||
store?.dataCommand?.isBangkok === "OFFICE")
|
||||
) {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
|
|
@ -316,10 +319,10 @@ function onConfirmOrder() {
|
|||
"คุณต้องการยืนยันการส่งออกคำสั่งใช่หรือไม่?"
|
||||
);
|
||||
} else {
|
||||
dialogMessageNotify(
|
||||
$q,
|
||||
"ไม่สามารถดำเนินการต่อได้ กรุณากรอกเลขที่คำสั่ง วันที่ลงนาม และวันที่คำสั่งมีผลให้ครบ"
|
||||
);
|
||||
const messageWarning = !store.isIdofficer
|
||||
? "ไม่สามารถดำเนินการต่อได้ กรุณากรอกเลขที่คำสั่ง วันที่ลงนาม และวันที่คำสั่งมีผลให้ครบ"
|
||||
: "ไม่สามารถดำเนินการต่อได้ กรุณากรอกเลขที่คำสั่ง วันที่ลงนาม วันที่คำสั่งมีผล และเลือกคำสั่งให้ครบ";
|
||||
dialogMessageNotify($q, messageWarning);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@ export const useCommandDetail = defineStore("commandDetailStore", () => {
|
|||
const readonly = ref<boolean>(false);
|
||||
const dataCommand = ref<FormDataDetail>();
|
||||
const status = ref<string>("");
|
||||
const isSalary = ref<boolean>(false)
|
||||
const isSalary = ref<boolean>(false);
|
||||
const isIdofficer = ref<boolean>(false);
|
||||
function checkStep(val: string) {
|
||||
status.value = val;
|
||||
switch (val) {
|
||||
|
|
@ -39,6 +40,7 @@ export const useCommandDetail = defineStore("commandDetailStore", () => {
|
|||
readonly,
|
||||
status,
|
||||
dataCommand,
|
||||
isSalary
|
||||
isSalary,
|
||||
isIdofficer,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -92,12 +92,25 @@ async function fetchDataCommandList() {
|
|||
});
|
||||
}
|
||||
|
||||
/** ฟังก์ชันเช็ค สกจ.*/
|
||||
async function fetchCheckIdofficer() {
|
||||
await http
|
||||
.get(config.API.checkIdofficer)
|
||||
.then((res) => {
|
||||
store.isIdofficer = res.data.result;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ทำงานเมื่อ Components ถูกเรียกใช้งาน
|
||||
* กำหนดค่า `store.readonly` เมื่อ route.name เป็น "commandViewDetailPage" จะอ่านข้อมูลได้อย่างเดียว
|
||||
*/
|
||||
onMounted(async () => {
|
||||
await fetchDataCommandList();
|
||||
await fetchCheckIdofficer();
|
||||
store.readonly =
|
||||
route.name === "commandViewDetailPage" ||
|
||||
formCommandList.status === "REPORTED" ||
|
||||
|
|
|
|||
|
|
@ -111,17 +111,16 @@ async function fetchSummary() {
|
|||
* ฟังก์ชัน DownloadReport
|
||||
* @param list รายงานที่ต้องการดาวน์โหลด
|
||||
*/
|
||||
async function getReport(list: string) {
|
||||
const listFind = baseDocument.value.find(
|
||||
(item: DataDocument) => item.val == list
|
||||
)?.val;
|
||||
const newReport = listFind === "report2" ? "report2-history" : listFind;
|
||||
async function getReport(valReport: string) {
|
||||
pdfSrc.value = undefined;
|
||||
page.value = 1;
|
||||
isLoadPDF.value = true;
|
||||
if (newReport) {
|
||||
if (valReport) {
|
||||
await http
|
||||
.get(config.API.orgReport(newReport) + `/${organizationId.value}`)
|
||||
.post(config.API.orgReport(valReport), {
|
||||
node: 0,
|
||||
nodeId: organizationId.value,
|
||||
})
|
||||
.then(async (res) => {
|
||||
const data = res.data.result;
|
||||
detailReport.value = data;
|
||||
|
|
@ -414,10 +413,8 @@ onMounted(async () => {
|
|||
color="primary"
|
||||
icon="download"
|
||||
>
|
||||
<q-tooltip>
|
||||
ดาวน์โหลดรายงาน
|
||||
</q-tooltip>
|
||||
|
||||
<q-tooltip> ดาวน์โหลดรายงาน </q-tooltip>
|
||||
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item
|
||||
|
|
|
|||
|
|
@ -807,28 +807,6 @@ onMounted(() => {
|
|||
</div>
|
||||
</div>
|
||||
</q-form>
|
||||
|
||||
<div class="q-pa-sm q-gutter-sm">
|
||||
<q-card flat bordered class="col-12">
|
||||
<div class="row q-col-gutter-sm q-pa-sm">
|
||||
<div class="row col-12">
|
||||
<q-card bordered class="col-12 filter-card q-pa-sm">
|
||||
<div class="row col-12 q-col-gutter-sm items-center">
|
||||
<div class="row col-md-8 col-sx-12 q-col-gutter-sm">
|
||||
<div class="col-md-3 col-xs-6"></div>
|
||||
<div class="col-md-3 col-xs-6"></div>
|
||||
|
||||
<div class="col-md-3 col-xs-6"></div>
|
||||
</div>
|
||||
<div class="row q-col-gutter-sm col-md-12">
|
||||
<div class="col-md-4 col-xs-12"></div>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
|
|
@ -22,6 +22,12 @@ export default defineComponent({
|
|||
label="กลับไปหน้าหลัก"
|
||||
no-caps
|
||||
/>
|
||||
|
||||
<div class="q-mt-xl text-subtitle1">
|
||||
<q-icon name="mdi-alert-circle-outline" size="20px" class="q-mr-sm" />
|
||||
พบปัญหาการใช้งานกรุณาติดต่อผู้ดูแลระบบ
|
||||
<span class="text-weight-bold q-ml-xs">088-264-9800</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -18,6 +18,12 @@
|
|||
label="กลับหน้าหลัก"
|
||||
no-caps
|
||||
/>
|
||||
|
||||
<div class="q-mt-xl text-subtitle1 text-grey-8">
|
||||
<q-icon name="mdi-alert-circle-outline" size="20px" class="q-mr-sm" />
|
||||
พบปัญหาการใช้งานกรุณาติดต่อผู้ดูแลระบบ
|
||||
<span class="text-weight-bold text-dark q-ml-xs">088-264-9800</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import { tabList, tabListPlacement } from "../interface/request/main/main";
|
|||
|
||||
import LoginLinkage from "@/components/LoginLinkage.vue";
|
||||
import DialogDebug from "@/components/Dialogs/DialogDebug.vue";
|
||||
import FooterContact from "@/components/FooterContact.vue";
|
||||
|
||||
// landing page config url
|
||||
const configParam = {
|
||||
|
|
@ -1282,6 +1283,10 @@ function onViewDetailNoti(url: string) {
|
|||
<router-view :key="$route.fullPath" />
|
||||
</q-page>
|
||||
</q-page-container>
|
||||
<q-footer class="bg-grey-1 text-dark q-pa-md" bordered>
|
||||
<FooterContact />
|
||||
</q-footer>
|
||||
|
||||
<full-loader :visibility="loader" />
|
||||
<LoginLinkage v-model:modal="modalLoginLinkage" />
|
||||
<DialogDebug v-model:modal="modalDebug" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue