Merge branch 'develop' into devTee
This commit is contained in:
commit
b72db61893
19 changed files with 1012 additions and 992 deletions
|
|
@ -8,7 +8,12 @@ export default {
|
|||
logRecord: () => `${leave}/log-record`,
|
||||
timeRecord: () => `${leave}/time-record`,
|
||||
timeRecordById: (id: string) => `${leave}/time-record/${id}`,
|
||||
/** เปลี่ยนแปลงลงเวลา*/
|
||||
leaveSearch: () => `${leave}/search`,
|
||||
leaveRound: () => `${leave}/round`,
|
||||
leaveRoundById: (id: string) => `${leave}/round/${id}`,
|
||||
/**ลงเวลาพิเศษ */
|
||||
specialTime: () => `${leave}/admin/edit`,
|
||||
specialTimeApprove: (id: string) => `${leave}/admin/edit/approve/${id}`,
|
||||
specialTimeReject: (id: string) => `${leave}/admin/edit/reject/${id}`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import env from "../index";
|
||||
const discipline = `${env.API_URI}/discipline`;
|
||||
const investigate = `${env.API_URI}/discipline/investigate`
|
||||
const investigate = `${env.API_URI}/discipline/investigate`;
|
||||
|
||||
export default {
|
||||
directorList: (page: number, pageSize: number, keyword: string) =>
|
||||
|
|
@ -14,33 +14,35 @@ export default {
|
|||
/**ลบ ช่องทางการร้องเรียน
|
||||
* @param id type
|
||||
*/
|
||||
complaintChannelbyId:(id:string) => `${discipline}/complaint_Channel/${id}`,
|
||||
complaintAdd:() => `${discipline}/complaint`,
|
||||
complaintbyId:(id:string) => `${discipline}/complaint/${id}`,
|
||||
complaintReject:(id:string) => `${discipline}/complaint/reject/${id}`,
|
||||
complaintResume:(id:string) => `${discipline}/complaint/resume/${id}`,
|
||||
complaintList:(page:number,pageSize:number,keyword:string) => `${discipline}/complaint?page=${page}&pageSize=${pageSize}&keyword=${keyword}`,
|
||||
complaintFileUpload:(id:string) => `${discipline}/complaint/file/${id}`,
|
||||
complaintFileDelete:(id:string,docId:string) => `${discipline}/complaint/file/${id}/${docId}`,
|
||||
complaintApprove:(id:string) => `${discipline}/complaint/approve/${id}`,
|
||||
|
||||
complaintChannelbyId: (id: string) => `${discipline}/complaint_Channel/${id}`,
|
||||
complaintAdd: () => `${discipline}/complaint`,
|
||||
complaintbyId: (id: string) => `${discipline}/complaint/${id}`,
|
||||
complaintReject: (id: string) => `${discipline}/complaint/reject/${id}`,
|
||||
complaintResume: (id: string) => `${discipline}/complaint/resume/${id}`,
|
||||
complaintList: (page: number, pageSize: number, keyword: string) =>
|
||||
`${discipline}/complaint?page=${page}&pageSize=${pageSize}&keyword=${keyword}`,
|
||||
complaintFileUpload: (id: string) => `${discipline}/complaint/file/${id}`,
|
||||
complaintFileDelete: (id: string, docId: string) =>
|
||||
`${discipline}/complaint/file/${id}/${docId}`,
|
||||
complaintApprove: (id: string) => `${discipline}/complaint/approve/${id}`,
|
||||
|
||||
/** API สืบสวนข้อเท็จจริง*/
|
||||
investigateMain:(page:number,pageSize:number,keyword:string) =>`${investigate}?page=${page}&pageSize=${pageSize}&keyword=${keyword}`,
|
||||
investigateById:(id:string) => `${investigate}/${id}`,
|
||||
investigateMain: (page: number, pageSize: number, keyword: string) =>
|
||||
`${investigate}?page=${page}&pageSize=${pageSize}&keyword=${keyword}`,
|
||||
investigateById: (id: string) => `${investigate}/${id}`,
|
||||
|
||||
investigateRelevantUploadFile: (id: string) =>
|
||||
`${investigate}/relevant/file/${id}`,
|
||||
investigateRelevantFileDelete: (id: string, docId: string) =>
|
||||
`${investigate}/relevant/file/${id}/${docId}`,
|
||||
|
||||
investigateUploadFile: (id: string) => `${investigate}/file/${id}`,
|
||||
investigateFileDelete: (id: string, docId: string) =>
|
||||
`${investigate}/file/${id}/${docId}`,
|
||||
|
||||
|
||||
investigateRelevantUploadFile:(id:string) => `${investigate}/relevant/file/${id}`,
|
||||
investigateRelevantFileDelete:(id:string,docId:string) => `${investigate}/relevant/file/${id}/${docId}`,
|
||||
|
||||
investigateUploadFile:(id:string) => `${investigate}/file/${id}`,
|
||||
investigateFileDelete:(id:string,docId:string) => `${investigate}/file/${id}/${docId}`,
|
||||
|
||||
investigateReject:(id:string) => `${investigate}/reject/${id}`,
|
||||
investigateResume:(id:string) => `${investigate}/resume/${id}`,
|
||||
investigateApprove:(id:string) => `${investigate}/approve/${id}`,
|
||||
investigateReject: (id: string) => `${investigate}/reject/${id}`,
|
||||
investigateResume: (id: string) => `${investigate}/resume/${id}`,
|
||||
investigateApprove: (id: string) => `${investigate}/approve/${id}`,
|
||||
|
||||
/** ระบบวินัยเรื่องสอบสวน */
|
||||
disciplineDisciplinary: () => `${discipline}/disciplinary`,
|
||||
|
|
@ -50,4 +52,5 @@ export default {
|
|||
`${discipline}/disciplinary/investigate/${id}`,
|
||||
disciplineComplaintsById: (id: string) =>
|
||||
`${discipline}/disciplinary/complaint/${id}`,
|
||||
disciplineDirector: () => `${discipline}/director`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -91,8 +91,8 @@ async function changeRound() {
|
|||
.post(config.API.leaveRound(), {
|
||||
profileId: props.personId,
|
||||
roundId: formData.round,
|
||||
effectDate: formData.effectiveDate,
|
||||
remark: formData.round,
|
||||
effectiveDate: formData.effectiveDate,
|
||||
remark: formData.reson,
|
||||
})
|
||||
.then(() => {
|
||||
success($q, "บันทึกข้อมูลเปลี่ยนรอบเวลา");
|
||||
|
|
@ -306,6 +306,7 @@ watch(
|
|||
dense
|
||||
class="custom-header-table"
|
||||
:visible-columns="dataStore.visibleColumnsHistory"
|
||||
:rows-per-page-options="[10, 25, 50, 100]"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
|
|
|
|||
|
|
@ -8,11 +8,20 @@ import DialogHeader from "@/components/DialogHeader.vue";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useSpecialTimeStore } from "@/modules/09_leave/stores/SpecialTimeStore";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
const SpecialTimeStore = useSpecialTimeStore();
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { dialogConfirm, date2Thai } = mixin;
|
||||
const {
|
||||
dialogConfirm,
|
||||
date2Thai,
|
||||
showLoader,
|
||||
success,
|
||||
messageError,
|
||||
hideLoader,
|
||||
} = mixin;
|
||||
const currentDate = ref<Date | null>(new Date());
|
||||
const checkInRef = ref<Object | null>(null);
|
||||
const checkOutRef = ref<Object | null>(null);
|
||||
|
|
@ -51,25 +60,54 @@ function validateForm() {
|
|||
console.log(hasError);
|
||||
}
|
||||
}
|
||||
function onSubmit() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
props.closeDialog?.();
|
||||
},
|
||||
"ยืนยันการบันทึกข้อมูล",
|
||||
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
|
||||
);
|
||||
}
|
||||
|
||||
const props = defineProps({
|
||||
modal: { type: Boolean, default: "" },
|
||||
editCheck: { type: String, default: "" },
|
||||
date: { type: String, default: "" },
|
||||
dateFix: { type: String, default: "" },
|
||||
id: { type: String, default: "" },
|
||||
closeDialog: { type: Function, default: () => {} },
|
||||
detailData: Object,
|
||||
});
|
||||
|
||||
function onSubmit() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
props.closeDialog?.();
|
||||
await approveData();
|
||||
},
|
||||
"ยืนยันการบันทึกข้อมูล",
|
||||
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
|
||||
);
|
||||
console.log(props.dateFix);
|
||||
console.log(props.id);
|
||||
}
|
||||
|
||||
const approveData = async () => {
|
||||
showLoader();
|
||||
const body = {
|
||||
checkInTime: formData.checkIn,
|
||||
checkOutTime: formData.checkOut,
|
||||
checkInStatus: SpecialTimeStore.checkInStatus,
|
||||
checkOutStatus: SpecialTimeStore.checkOutStatus,
|
||||
reason: formData.note,
|
||||
};
|
||||
await http
|
||||
.put(config.API.specialTimeApprove(props.id), body)
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
hideLoader();
|
||||
})
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
function close() {
|
||||
if (props.closeDialog) {
|
||||
props.closeDialog();
|
||||
|
|
|
|||
|
|
@ -185,7 +185,6 @@ export const useChangeRoundDataStore = defineStore(
|
|||
}
|
||||
|
||||
async function fetchDatainHistory() {
|
||||
console.log("tes");
|
||||
console.log(profileId.value);
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -232,6 +231,7 @@ export const useChangeRoundDataStore = defineStore(
|
|||
fetchDataForCardId,
|
||||
checkCilck,
|
||||
setProfileId,
|
||||
changePage,
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,45 +1,58 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
import { ref, watch, defineEmits } from "vue";
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { DataRows } from "@/modules/09_leave/interface/response/specialTime";
|
||||
import type { ListData } from "@/modules/09_leave/interface/request/specialTime";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import type { DataOption } from "@/modules/09_leave/interface/index/Main";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai } = mixin;
|
||||
const {
|
||||
date2Thai,
|
||||
messageError,
|
||||
showLoader,
|
||||
dialogMessageNotify,
|
||||
dialogConfirm,
|
||||
success,
|
||||
hideLoader,
|
||||
} = mixin;
|
||||
|
||||
export const useSpecialTimeStore = defineStore("LeaveSpecialTime", () => {
|
||||
const rows = ref<any[]>([]);
|
||||
const selectDate = ref<Date | null>(new Date());
|
||||
const fiscalYear = ref<string | null>("0");
|
||||
const DataMainOrig = ref<DataRows[]>([]); // ข้อมูลหลักดั้งเดิม
|
||||
async function fecthList(data: ListData[]) {
|
||||
let datalist: DataRows[] = data.map((e: ListData) => ({
|
||||
id: e.id,
|
||||
fullname: e.fullname,
|
||||
date: date2Thai(new Date(e.date), false, true),
|
||||
dateFix: date2Thai(new Date(e.dateFix)),
|
||||
timeMorning:
|
||||
e.startTimeMorning == null
|
||||
? "-"
|
||||
: e.startTimeMorning + " - " + e.endTimeMorning,
|
||||
timeAfternoon:
|
||||
e.startTimeAfternoon == null
|
||||
? "-"
|
||||
: e.startTimeAfternoon + " - " + e.endTimeAfternoon,
|
||||
startTimeMorning: e.startTimeMorning,
|
||||
endTimeMorning: e.endTimeMorning,
|
||||
startTimeAfternoon: e.startTimeAfternoon,
|
||||
endTimeAfternoon: e.endTimeAfternoon,
|
||||
checkIn: e.checkOut,
|
||||
checkOut: e.checkOut,
|
||||
status: e.status,
|
||||
checkInStatus: convertStatus(e.checkInStatus),
|
||||
checkOutStatus: convertStatus(e.checkOutStatus),
|
||||
}));
|
||||
rows.value = datalist;
|
||||
DataMainOrig.value = datalist;
|
||||
}
|
||||
// async function fecthList(data: ListData[]) {
|
||||
// let datalist: DataRows[] = data.map((e: ListData) => ({
|
||||
// id: e.id,
|
||||
// fullname: e.fullname,
|
||||
// date: date2Thai(new Date(e.date), false, true),
|
||||
// dateFix: date2Thai(new Date(e.dateFix)),
|
||||
// timeMorning:
|
||||
// e.startTimeMorning == null
|
||||
// ? "-"
|
||||
// : e.startTimeMorning + " - " + e.endTimeMorning,
|
||||
// timeAfternoon:
|
||||
// e.startTimeAfternoon == null
|
||||
// ? "-"
|
||||
// : e.startTimeAfternoon + " - " + e.endTimeAfternoon,
|
||||
// startTimeMorning: e.startTimeMorning,
|
||||
// endTimeMorning: e.endTimeMorning,
|
||||
// startTimeAfternoon: e.startTimeAfternoon,
|
||||
// endTimeAfternoon: e.endTimeAfternoon,
|
||||
// checkIn: e.checkOut,
|
||||
// checkOut: e.checkOut,
|
||||
// status: e.status,
|
||||
// checkInStatus: convertStatus(e.checkInStatus),
|
||||
// checkOutStatus: convertStatus(e.checkOutStatus),
|
||||
// }));
|
||||
// rows.value = datalist;
|
||||
// DataMainOrig.value = datalist;
|
||||
// }
|
||||
const DataMainUpdate = ref<DataRows[]>([]); // ข้อมูลเปลี่ยนแปลง
|
||||
const DataMain = (val: DataRows[]) => (DataMainOrig.value = val);
|
||||
const DataUpdate = (filterYear: string) => {
|
||||
|
|
@ -51,6 +64,105 @@ export const useSpecialTimeStore = defineStore("LeaveSpecialTime", () => {
|
|||
const checkInStatus = ref<String>("ปกติ");
|
||||
const checkOutStatus = ref<String>("ปกติ");
|
||||
|
||||
// paging
|
||||
const year = ref<number>(2023);
|
||||
const month = ref<number>(11);
|
||||
const page = ref<number>(1);
|
||||
const pageSize = ref<number>(10);
|
||||
const filter = ref<string>(""); //search data table
|
||||
|
||||
// Pagination - update rowsPerPage
|
||||
async function updatePagination(newPagination: any) {
|
||||
initialPagination.value = newPagination;
|
||||
// currentPage.value = 1;
|
||||
console.log("updatePagination");
|
||||
}
|
||||
|
||||
// Pagination - initial pagination
|
||||
const initialPagination = ref<any>({
|
||||
sortBy: null,
|
||||
descending: false,
|
||||
page: 1,
|
||||
// rowsPerPage: pageSize,
|
||||
});
|
||||
|
||||
// Pagination - page & change page & get new data
|
||||
// const currentPage = ref<number>(1);
|
||||
// watch(
|
||||
// [() => currentPage.value, () => initialPagination.value.rowsPerPage],
|
||||
// () => {
|
||||
// emit(
|
||||
// "update:change-page",
|
||||
// currentPage.value,
|
||||
// initialPagination.value.rowsPerPage,
|
||||
// true
|
||||
// );
|
||||
// }
|
||||
// );
|
||||
|
||||
// const emit = defineEmits(["update:change-page"]);
|
||||
/**
|
||||
* ฟังก์ชั่น api เปลี่ยนหน้า
|
||||
* @param pageVal page
|
||||
* @param pageSizeVal pagesize
|
||||
*/
|
||||
async function changePage(pageVal: number, pageSizeVal: number) {
|
||||
page.value = await pageVal;
|
||||
pageSize.value = await pageSizeVal;
|
||||
console.log("changePage");
|
||||
fetchData();
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังชั้นเรียกดูข้อมูล
|
||||
*/
|
||||
const fetchData = async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(
|
||||
config.API.specialTime() +
|
||||
`?year=${year.value}&month=${month.value}&page=${page.value}&pageSize=${pageSize.value}&keyword=${filter.value}`
|
||||
)
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
data.map((e: any) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
fullname: e.fullname,
|
||||
date: date2Thai(new Date(e.checkDate), false, true),
|
||||
dateFix: date2Thai(new Date(e.createdAt)),
|
||||
timeMorning:
|
||||
e.startTimeMorning == null
|
||||
? "-"
|
||||
: e.startTimeMorning + " - " + e.endTimeMorning,
|
||||
timeAfternoon:
|
||||
e.startTimeAfternoon == null
|
||||
? "-"
|
||||
: e.startTimeAfternoon + " - " + e.endTimeAfternoon,
|
||||
startTimeMorning: e.startTimeMorning,
|
||||
endTimeMorning: e.endTimeMorning,
|
||||
startTimeAfternoon: e.startTimeAfternoon,
|
||||
endTimeAfternoon: e.endTimeAfternoon,
|
||||
checkIn: e.checkInTime,
|
||||
checkOut: e.checkOutTime,
|
||||
status: e.status,
|
||||
checkInStatus: convertStatus(e.checkInStatus),
|
||||
checkOutStatus: convertStatus(e.checkOutStatus),
|
||||
reason: e.reason,
|
||||
description: e.description,
|
||||
checkInEdit: e.checkInEdit,
|
||||
checkOutEdit: e.checkOutEdit,
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
//--------------|ฟิลเตอร์|--------------------------------------//
|
||||
const searchFilterTable = async (searchDate: any) => {
|
||||
rows.value = [];
|
||||
|
|
@ -175,7 +287,7 @@ export const useSpecialTimeStore = defineStore("LeaveSpecialTime", () => {
|
|||
}
|
||||
|
||||
return {
|
||||
fecthList,
|
||||
// fecthList,
|
||||
rows,
|
||||
visibleColumns,
|
||||
columns,
|
||||
|
|
@ -185,5 +297,9 @@ export const useSpecialTimeStore = defineStore("LeaveSpecialTime", () => {
|
|||
checkInStatus,
|
||||
checkOutStatus,
|
||||
optionStatus,
|
||||
fetchData,
|
||||
changePage,
|
||||
initialPagination,
|
||||
updatePagination,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -201,6 +201,7 @@ onMounted(() => {
|
|||
:editCheck="editCheck"
|
||||
:DataRow="DataRow"
|
||||
:personId="DataRow == null ? '' : DataRow.profileId"
|
||||
@update:change-page="dataStore.changePage"
|
||||
/>
|
||||
</template>
|
||||
<style scoped lang="scss">
|
||||
|
|
|
|||
|
|
@ -1,40 +1,56 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, ref, useAttrs } from "vue";
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import type { Pagination } from "@/modules/03_recruiting/interface/index/Main";
|
||||
import { useSpecialTimeStore } from "@/modules/09_leave/stores/SpecialTimeStore";
|
||||
import DialogReason from "@/components/Dialogs/PopupReason.vue";
|
||||
import DialogApprove from "@/modules/09_leave/components/4_specialTime/DialogApprove.vue";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
import { useRouter } from "vue-router";
|
||||
import { identity } from "@fullcalendar/core/internal";
|
||||
const dataSpecialTime = useSpecialTimeStore();
|
||||
const { fecthList } = dataSpecialTime;
|
||||
const $q = useQuasar(); // show dialog
|
||||
const mixin = useCounterMixin();
|
||||
const router = useRouter();
|
||||
const { hideLoader, monthYear2Thai } = mixin;
|
||||
const { hideLoader, monthYear2Thai, messageError, showLoader, success } = mixin;
|
||||
const modalUnapprove = ref(false);
|
||||
const modalApprove = ref(false);
|
||||
const detailData = ref<any>();
|
||||
const editCheck = ref<string>("");
|
||||
|
||||
const pagination = ref({
|
||||
// sortBy: "desc",
|
||||
descending: false,
|
||||
page: 1,
|
||||
rowsPerPage: 10,
|
||||
});
|
||||
|
||||
const dialogTitle = ref<string>("");
|
||||
const dialogDesc = ref<string>("");
|
||||
const name = ref<string>("");
|
||||
const id = ref<string>("");
|
||||
const reasonNote = ref<string>("");
|
||||
const dateDialog = ref<string>("");
|
||||
const dateFixDialog = ref<string>("");
|
||||
const unapprove = async (fullname: string) => {
|
||||
const unapprove = async (fullname: string, personId: string) => {
|
||||
id.value = personId;
|
||||
dialogTitle.value = " ไม่อนุมัติการลงเวลาพิเศษของ" + fullname;
|
||||
name.value = fullname;
|
||||
modalUnapprove.value = true;
|
||||
// rejectData();
|
||||
};
|
||||
function openModal(data: any, check: string, date: string, dateFix: string) {
|
||||
function openModal(
|
||||
data: any,
|
||||
check: string,
|
||||
date: string,
|
||||
dateFix: string,
|
||||
personId: string
|
||||
) {
|
||||
id.value = personId;
|
||||
console.log(personId);
|
||||
modalApprove.value = true;
|
||||
dateDialog.value = date;
|
||||
dateFixDialog.value = dateFix;
|
||||
|
|
@ -49,9 +65,25 @@ const closeDialog = () => {
|
|||
modalApprove.value = false;
|
||||
editCheck.value = "PENDING";
|
||||
};
|
||||
const clickSave = () => {
|
||||
|
||||
/** API reject */
|
||||
const clickSave = async (reason: string) => {
|
||||
modalUnapprove.value = false;
|
||||
const body = {
|
||||
reason: reason,
|
||||
};
|
||||
await http
|
||||
.put(config.API.specialTimeReject(id.value), body)
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {});
|
||||
console.log(reason);
|
||||
};
|
||||
|
||||
// ค้นหาในตาราง
|
||||
const filterKeyword = ref<string>("");
|
||||
const filterRef = ref<HTMLInputElement | null>(null);
|
||||
|
|
@ -63,53 +95,54 @@ const resetFilter = () => {
|
|||
};
|
||||
|
||||
onMounted(async () => {
|
||||
fecthList([
|
||||
{
|
||||
id: "00000000-0000-0000-0000-000000000000",
|
||||
fullname: "นางสาวณัฐกา ชมสิน",
|
||||
date: "2023-11-01 08:54",
|
||||
dateFix: "2023-10-30",
|
||||
startTimeMorning: "08:00",
|
||||
endTimeMorning: "12:00",
|
||||
startTimeAfternoon: "08:00",
|
||||
endTimeAfternoon: "12:00",
|
||||
status: "PENDING",
|
||||
checkInStatus: "normal",
|
||||
checkOutStatus: "late",
|
||||
checkIn: "08:00",
|
||||
checkOut: "12.00",
|
||||
},
|
||||
{
|
||||
id: "00000000-0000-0000-0000-000000000000",
|
||||
fullname: "นางสาวรัชภรณ์ ภักดี",
|
||||
date: "2023-10-30 08:55",
|
||||
dateFix: "2023-10-29",
|
||||
startTimeMorning: "08:00",
|
||||
endTimeMorning: "12:00",
|
||||
startTimeAfternoon: null,
|
||||
endTimeAfternoon: null,
|
||||
status: "APPROVE",
|
||||
checkInStatus: "normal",
|
||||
checkOutStatus: "late",
|
||||
checkIn: "08:00",
|
||||
checkOut: "12.00",
|
||||
},
|
||||
{
|
||||
id: "00000000-0000-0000-0000-000000000000",
|
||||
fullname: "นางสาวภาพรรณ ลออ",
|
||||
date: "2023-10-31 18:54",
|
||||
dateFix: "2023-10-30",
|
||||
startTimeMorning: null,
|
||||
endTimeMorning: null,
|
||||
startTimeAfternoon: "13:00",
|
||||
endTimeAfternoon: "16:30",
|
||||
status: "REJECT",
|
||||
checkInStatus: "normal",
|
||||
checkOutStatus: "late",
|
||||
checkIn: "08:00",
|
||||
checkOut: "12.00",
|
||||
},
|
||||
]);
|
||||
// fecthList([
|
||||
// {
|
||||
// id: "eefa2f4f-c507-4a42-8567-4fadb8dc1f50",
|
||||
// fullname: "นางสาวณัฐกา ชมสิน",
|
||||
// date: "2023-11-01 08:54",
|
||||
// dateFix: "2023-10-30",
|
||||
// startTimeMorning: "08:00",
|
||||
// endTimeMorning: "12:00",
|
||||
// startTimeAfternoon: "08:00",
|
||||
// endTimeAfternoon: "12:00",
|
||||
// status: "PENDING",
|
||||
// checkInStatus: "normal",
|
||||
// checkOutStatus: "late",
|
||||
// checkIn: "08:00",
|
||||
// checkOut: "12.00",
|
||||
// },
|
||||
// {
|
||||
// id: "00000000-0000-0000-0000-000000000000",
|
||||
// fullname: "นางสาวรัชภรณ์ ภักดี",
|
||||
// date: "2023-10-30 08:55",
|
||||
// dateFix: "2023-10-29",
|
||||
// startTimeMorning: "08:00",
|
||||
// endTimeMorning: "12:00",
|
||||
// startTimeAfternoon: null,
|
||||
// endTimeAfternoon: null,
|
||||
// status: "APPROVE",
|
||||
// checkInStatus: "normal",
|
||||
// checkOutStatus: "late",
|
||||
// checkIn: "08:00",
|
||||
// checkOut: "12.00",
|
||||
// },
|
||||
// {
|
||||
// id: "00000000-0000-0000-0000-000000000000",
|
||||
// fullname: "นางสาวภาพรรณ ลออ",
|
||||
// date: "2023-10-31 18:54",
|
||||
// dateFix: "2023-10-30",
|
||||
// startTimeMorning: null,
|
||||
// endTimeMorning: null,
|
||||
// startTimeAfternoon: "13:00",
|
||||
// endTimeAfternoon: "16:30",
|
||||
// status: "REJECT",
|
||||
// checkInStatus: "normal",
|
||||
// checkOutStatus: "late",
|
||||
// checkIn: "08:00",
|
||||
// checkOut: "12.00",
|
||||
// },
|
||||
// ]);
|
||||
dataSpecialTime.fetchData();
|
||||
});
|
||||
|
||||
const selectedDate = ref<string>("");
|
||||
|
|
@ -213,8 +246,10 @@ const monthYearThai = (val: any) => {
|
|||
bordered
|
||||
:paging="true"
|
||||
dense
|
||||
v-model:pagination="pagination"
|
||||
:pagination="dataSpecialTime.initialPagination"
|
||||
:visible-columns="dataSpecialTime.visibleColumns"
|
||||
:rows-per-page-options="[1, 10, 25, 50, 100]"
|
||||
@update:pagination="dataSpecialTime.updatePagination"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
|
|
@ -241,7 +276,7 @@ const monthYearThai = (val: any) => {
|
|||
class="q-px-md"
|
||||
dense
|
||||
unelevated
|
||||
@click="unapprove(props.row.fullname)"
|
||||
@click="unapprove(props.row.fullname, props.row.id)"
|
||||
>ไม่อนุมัติ</q-btn
|
||||
>
|
||||
|
||||
|
|
@ -256,7 +291,8 @@ const monthYearThai = (val: any) => {
|
|||
props.row,
|
||||
'PENDING',
|
||||
props.row.date,
|
||||
props.row.dateFix
|
||||
props.row.dateFix,
|
||||
props.row.id
|
||||
)
|
||||
"
|
||||
>อนุมัติ</q-btn
|
||||
|
|
@ -294,6 +330,7 @@ const monthYearThai = (val: any) => {
|
|||
:closeDialog="closeDialog"
|
||||
:date="dateDialog"
|
||||
:dateFix="dateFixDialog"
|
||||
:id="id"
|
||||
:editCheck="editCheck"
|
||||
:detailData="detailData"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -948,9 +948,7 @@ onMounted(() => {
|
|||
</div>
|
||||
<div class="col-12 q-mt-sm q-mb-lg" v-if="props.data">
|
||||
<q-card flat bordered>
|
||||
<div
|
||||
class="col-xs-12 col-sm-12 text-weight-medium bg-grey-1 q-py-xs q-px-md"
|
||||
>
|
||||
<div class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
||||
{{
|
||||
formData.status === "NEW"
|
||||
? "อัปโหลดไฟล์เอกสารหลักฐาน"
|
||||
|
|
@ -959,7 +957,7 @@ onMounted(() => {
|
|||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<div
|
||||
class="row q-ma-sm q-col-gutter-x-sm"
|
||||
class="col-xs-12 q-px-md q-py-sm row"
|
||||
v-if="formData.status === 'NEW'"
|
||||
>
|
||||
<div class="col-11" id="documentFile">
|
||||
|
|
@ -996,7 +994,7 @@ onMounted(() => {
|
|||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="q-pa-md" v-if="fileList.length > 0">
|
||||
<div class="q-px-md q-py-sm" v-if="fileList.length > 0">
|
||||
<q-list bordered separator v-for="data in fileList" :key="data.id">
|
||||
<q-item clickable v-ripple class="items-center">
|
||||
<q-item-section>{{ data.fileName }}</q-item-section>
|
||||
|
|
@ -1007,7 +1005,6 @@ onMounted(() => {
|
|||
round
|
||||
dense
|
||||
color="blue"
|
||||
class="q-ml-sm"
|
||||
icon="mdi-download"
|
||||
@click="downloadFile(data.pathName)"
|
||||
><q-tooltip>ดาวน์โหลดไฟล์</q-tooltip></q-btn
|
||||
|
|
@ -1027,11 +1024,9 @@ onMounted(() => {
|
|||
</q-item>
|
||||
</q-list>
|
||||
</div>
|
||||
<div v-if="fileList.length === 0">
|
||||
<q-card class="bg-grey-4 q-ma-sm q-py-md" bordered>
|
||||
<p class="text-subtitle1 text-center q-ma-none text-bold">
|
||||
<div class="q-px-md q-py-sm" v-if="fileList.length === 0">
|
||||
<q-card class="q-pa-md" bordered>
|
||||
ไม่มีรายการเอกสาร
|
||||
</p>
|
||||
</q-card>
|
||||
</div>
|
||||
</q-card>
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, computed, watchEffect, watch, onMounted } 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 { directorType } from "@/modules/11_discipline/interface/index/Main";
|
||||
|
||||
import DialogHeader from "@/modules/05_placement/components/PersonalList/DialogHeader.vue";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
const $q = useQuasar();
|
||||
const selected = ref<directorType[]>([]);
|
||||
|
|
@ -60,17 +60,7 @@ const columns2 = ref<QTableProps["columns"]>([
|
|||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "duty",
|
||||
align: "left",
|
||||
label: "หน้าที่",
|
||||
sortable: true,
|
||||
field: "duty",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
|
||||
{
|
||||
name: "email",
|
||||
align: "left",
|
||||
|
|
@ -93,17 +83,6 @@ const columns2 = ref<QTableProps["columns"]>([
|
|||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "role",
|
||||
align: "left",
|
||||
label: "จำนวนเรื่องสืบสวน",
|
||||
sortable: true,
|
||||
field: "role",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
]);
|
||||
|
||||
/** รับ props มาจากหน้าหลัก */
|
||||
|
|
@ -139,7 +118,6 @@ const checkSelected = computed(() => {
|
|||
if (selected.value.length === 0) {
|
||||
return true;
|
||||
}
|
||||
console.log(checkSelected.value);
|
||||
});
|
||||
|
||||
/** popup ยืนยันส่งัว */
|
||||
|
|
@ -154,14 +132,14 @@ function saveDirector() {
|
|||
|
||||
/** ส่งไปออกคำสั่ง */
|
||||
async function DirectorSave() {
|
||||
emit('returnDirector',selected.value);
|
||||
emit("returnDirector", selected.value);
|
||||
}
|
||||
|
||||
const emit = defineEmits([
|
||||
"update:filterKeyword2",
|
||||
"update:selected",
|
||||
"update:pagination",
|
||||
"returnDirector"
|
||||
"returnDirector",
|
||||
]);
|
||||
|
||||
function updateInput(value: any) {
|
||||
|
|
@ -244,7 +222,17 @@ watch(
|
|||
:visible-columns="visibleColumns2"
|
||||
selection="multiple"
|
||||
v-model:selected="selected"
|
||||
:rows-per-page-options="[10, 25, 50, 100]"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<template v-slot:header-selection="scope">
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="scope.selected"
|
||||
/>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td>
|
||||
|
|
|
|||
|
|
@ -13,49 +13,53 @@ import { useQuasar } from "quasar";
|
|||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const store = useInvestigateDisStore();
|
||||
const { dialogConfirm } = mixin;
|
||||
const { dialogConfirm, success } = mixin;
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const id = ref<string>(route.params.id as string);
|
||||
|
||||
/** ข้อมูล v-model ของฟอร์ม */
|
||||
const data = reactive<FormData>({
|
||||
complaint: "",
|
||||
respondentType: "",
|
||||
dateInvestigate: null,
|
||||
dateAllegation: null,
|
||||
dateEvident: null,
|
||||
casefault: "",
|
||||
typefault: "",
|
||||
faultLevel: "",
|
||||
refLaw: "",
|
||||
detailComplaint: "",
|
||||
whereInvestigate: "",
|
||||
trueDetail: "",
|
||||
evidence: "",
|
||||
recordAccuser: "",
|
||||
witnesses: "",
|
||||
InvestResults: "",
|
||||
filesEvidence: null,
|
||||
filesRecordAccuser: null,
|
||||
filesWitnesses: null,
|
||||
filesEtc: null,
|
||||
complaintStatus: "NEW",
|
||||
organizationId: "",
|
||||
consideredAgency: "",
|
||||
});
|
||||
// const data = reactive<FormData>({
|
||||
// complaint: "",
|
||||
// respondentType: "",
|
||||
// dateInvestigate: null,
|
||||
// dateAllegation: null,
|
||||
// dateEvident: null,
|
||||
// casefault: "",
|
||||
// typefault: "",
|
||||
// faultLevel: "",
|
||||
// refLaw: "",
|
||||
// detailComplaint: "",
|
||||
// whereInvestigate: "",
|
||||
// trueDetail: "",
|
||||
// evidence: "",
|
||||
// recordAccuser: "",
|
||||
// witnesses: "",
|
||||
// InvestResults: "",
|
||||
// filesEvidence: null,
|
||||
// filesRecordAccuser: null,
|
||||
// filesWitnesses: null,
|
||||
// filesEtc: null,
|
||||
// complaintStatus: "NEW",
|
||||
// organizationId: "",
|
||||
// consideredAgency: "",
|
||||
// });
|
||||
|
||||
const data = ref<object>();
|
||||
|
||||
/** function fetchData สอบสวนคาวมผิดทางวินัย*/
|
||||
async function fetchDetailDisciplinary() {
|
||||
await http
|
||||
.get(config.API.disciplineDisciplinaryById(id.value))
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
data.value = res.data.result;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
|
||||
/** function fetchData สืบสวนข้อเท็จจริง*/
|
||||
async function fetchDetailInvestigate() {
|
||||
await http
|
||||
.get(config.API.disciplineInvestigateById(id.value))
|
||||
|
|
@ -67,6 +71,7 @@ async function fetchDetailInvestigate() {
|
|||
});
|
||||
}
|
||||
|
||||
/** function fetchData เรื่องร้องเรียน*/
|
||||
async function fetchDetailComplaints() {
|
||||
await http
|
||||
.get(config.API.disciplineComplaintsById(id.value))
|
||||
|
|
@ -78,28 +83,19 @@ async function fetchDetailComplaints() {
|
|||
});
|
||||
}
|
||||
|
||||
/** จำลองข้อมูลจาก api */
|
||||
const fetchData = async () => {
|
||||
data.complaint = "test1";
|
||||
data.dateInvestigate = new Date("2023-11-08T14:58:00");
|
||||
data.dateAllegation = new Date("2023-11-08T14:58:00");
|
||||
data.dateEvident = new Date("2023-11-08T14:58:00");
|
||||
data.casefault = "test1";
|
||||
data.typefault = "2";
|
||||
data.faultLevel = "2";
|
||||
data.refLaw = "test";
|
||||
data.detailComplaint = "รายละเอียด";
|
||||
data.whereInvestigate = "ที่ไหน";
|
||||
data.trueDetail = "รายละเอียด";
|
||||
data.evidence = "รายละเอียด";
|
||||
data.recordAccuser = "รายละเอียด";
|
||||
data.witnesses = "รายละเอียด";
|
||||
data.InvestResults = "รายละเอียด";
|
||||
data.filesEvidence = null;
|
||||
data.filesRecordAccuser = null;
|
||||
data.filesWitnesses = null;
|
||||
data.filesEtc = null;
|
||||
};
|
||||
async function onSubmitDisciplinary(data: any) {
|
||||
console.log(data);
|
||||
|
||||
await http
|
||||
.put(config.API.disciplineDisciplinaryById(id.value), data)
|
||||
.then(() => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((err) => {})
|
||||
.finally(async () => {
|
||||
await fetchDetailDisciplinary();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* บันทึกข้อมูลที่เเก้ไข
|
||||
|
|
@ -157,7 +153,7 @@ function confirmCancelInvestigate() {
|
|||
|
||||
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
||||
onMounted(async () => {
|
||||
store.tabMenu = 'disciplinary'
|
||||
store.tabMenu = "disciplinary";
|
||||
await fetchDetailDisciplinary();
|
||||
});
|
||||
|
||||
|
|
@ -200,7 +196,7 @@ watch(
|
|||
<div class="q-ma-none">แก้ไขการสอบสวนความผิดทางวินัย</div>
|
||||
<q-space />
|
||||
<div class="q-gutter-x-sm">
|
||||
<q-btn
|
||||
<!-- <q-btn
|
||||
v-if="data.complaintStatus === 'NEW'"
|
||||
label="ส่งไปสรุปผลการพิจารณา"
|
||||
color="public"
|
||||
|
|
@ -217,7 +213,7 @@ watch(
|
|||
label="ยกเลิกการยุติเรื่อง"
|
||||
color="red-7"
|
||||
@click="cancelInvestigate"
|
||||
/>
|
||||
/> -->
|
||||
</div>
|
||||
</div>
|
||||
<q-card flat class="col-12">
|
||||
|
|
@ -244,7 +240,11 @@ watch(
|
|||
<FormInvestigatefacts :on-submit="onSubmit" :data="data" />
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="disciplinary">
|
||||
<FormDisciplinary :on-submit="onSubmit" :data="data" />
|
||||
<FormDisciplinary
|
||||
:on-submit="onSubmit"
|
||||
:data="data"
|
||||
@submit:disciplinary="onSubmitDisciplinary"
|
||||
/>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</q-card>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -40,7 +40,6 @@ async function fetchListDisciplinary() {
|
|||
res.data.result.total / initialPagination.value.rowsPerPage
|
||||
);
|
||||
fetchList(data);
|
||||
console.log(data);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ const props = defineProps({
|
|||
* อัปโหลดหลักฐานสนับสนุนข้อกล่าวหา
|
||||
*/
|
||||
function uploadFile() {
|
||||
console.log("test");
|
||||
|
||||
// const Data = new FormData();
|
||||
// Data.append("file", file.value);
|
||||
// showLoader();
|
||||
|
|
@ -96,7 +98,7 @@ function removeFile(id: string) {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 q-pa-sm row">
|
||||
<div class="col-xs-12 q-pa-sm row" v-if="props.files">
|
||||
<q-list
|
||||
v-if="props.files.length > 0"
|
||||
bordered
|
||||
|
|
|
|||
|
|
@ -9,14 +9,14 @@ interface DataNumberOption {
|
|||
}
|
||||
|
||||
interface InvestigatefactsDataRowType {
|
||||
id:string,
|
||||
id: string;
|
||||
title: string;
|
||||
respondentType: string;
|
||||
offenseDetails: string,
|
||||
investigationDetail: string,
|
||||
dateInvestigate: string,
|
||||
investigationStatusResult: string,
|
||||
status: string
|
||||
offenseDetails: string;
|
||||
investigationDetail: string;
|
||||
dateInvestigate: string;
|
||||
investigationStatusResult: string;
|
||||
status: string;
|
||||
}
|
||||
|
||||
interface investigateDisDataRowType {
|
||||
|
|
@ -32,23 +32,29 @@ interface investigateDisDataRowType {
|
|||
}
|
||||
|
||||
interface directorType {
|
||||
id:string
|
||||
prefix:string
|
||||
firstName:string
|
||||
lastName:string
|
||||
id: string;
|
||||
directorId: string;
|
||||
prefix: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
position: string;
|
||||
email: string;
|
||||
phone: string;
|
||||
total: number;
|
||||
duty: string;
|
||||
}
|
||||
interface responseType {
|
||||
id:string
|
||||
name:string
|
||||
prefix:string
|
||||
firstName:string
|
||||
lastName:string
|
||||
position:string
|
||||
email:string
|
||||
phone:string
|
||||
id: string;
|
||||
directorId: string;
|
||||
name: string;
|
||||
prefix: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
position: string;
|
||||
email: string;
|
||||
phone: string;
|
||||
total: number;
|
||||
duty: string;
|
||||
}
|
||||
|
||||
interface FileLists {
|
||||
|
|
|
|||
|
|
@ -1,50 +1,104 @@
|
|||
interface Persons {
|
||||
personId: string; //id อ้างอิง profile
|
||||
idcard: string; //รหัสบัตรประชาชน
|
||||
prefix: string; //คำนำหน้า
|
||||
firstName: string; //ชื่อ
|
||||
lastName: string; //นามสกุล
|
||||
posNo: string; //เลขที่ตำแหน่ง
|
||||
position: string; //ตำแหน่ง
|
||||
positionLevel: string; //ระดับ
|
||||
salary: number; //เงินเดือน
|
||||
organization: string; //สังกัด
|
||||
name: string;
|
||||
}
|
||||
interface Director {
|
||||
directorId: string;
|
||||
duty: string;
|
||||
email: string;
|
||||
firstName: string;
|
||||
id: string;
|
||||
lastName: string;
|
||||
phone: string;
|
||||
position: string;
|
||||
prefix: string;
|
||||
total: number;
|
||||
}
|
||||
// interface Persons {
|
||||
// personId: string; //id อ้างอิง profile
|
||||
// idcard: string; //รหัสบัตรประชาชน
|
||||
// prefix: string; //คำนำหน้า
|
||||
// firstName: string; //ชื่อ
|
||||
// lastName: string; //นามสกุล
|
||||
// posNo: string; //เลขที่ตำแหน่ง
|
||||
// position: string; //ตำแหน่ง
|
||||
// positionLevel: string; //ระดับ
|
||||
// salary: number; //เงินเดือน
|
||||
// organization: string; //สังกัด
|
||||
// }
|
||||
|
||||
interface FormData {
|
||||
complaint: string;
|
||||
respondentType: string;
|
||||
dateInvestigate: Date | null;
|
||||
dateAllegation: Date | null;
|
||||
dateEvident: Date | null;
|
||||
filesEvidence: File | null;
|
||||
filesRecordAccuser: File | null;
|
||||
filesWitnesses: File | null;
|
||||
filesEtc: File | null;
|
||||
casefault: string;
|
||||
typefault: string;
|
||||
faultLevel: string;
|
||||
refLaw: string;
|
||||
detailComplaint: string;
|
||||
whereInvestigate: string;
|
||||
trueDetail: string;
|
||||
evidence: string;
|
||||
recordAccuser: string;
|
||||
witnesses: string;
|
||||
InvestResults: string;
|
||||
complaintStatus: string;
|
||||
organizationId: string;
|
||||
consideredAgency: string;
|
||||
disciplinaryDateAllegation: Date | null;
|
||||
disciplinaryDateEvident: Date | null;
|
||||
disciplinaryCaseFault: string;
|
||||
disciplinaryInvestigateAt: string;
|
||||
disciplinaryFaultLevel: string;
|
||||
disciplinaryRefLaw: string;
|
||||
disciplinarySummaryEvidence: string;
|
||||
disciplinaryRecordAccuser: string;
|
||||
disciplinaryWitnesses: string;
|
||||
result: string;
|
||||
directors: Director[];
|
||||
persons: Persons[];
|
||||
|
||||
// filesWitnesses: File | null;
|
||||
// filesEtc: File | null;
|
||||
// casefault: string;
|
||||
// typefault: string;
|
||||
// faultLevel: string;
|
||||
// refLaw: string;
|
||||
// detailComplaint: string;
|
||||
// whereInvestigate: string;
|
||||
// trueDetail: string;
|
||||
// evidence: string;
|
||||
// recordAccuser: string;
|
||||
// witnesses: string;
|
||||
// InvestResults: string;
|
||||
// complaintStatus: string;
|
||||
|
||||
// consideredAgency: string;
|
||||
}
|
||||
|
||||
interface disciplinaryRef {
|
||||
complaint: object | null;
|
||||
dateInvestigate: object | null;
|
||||
dateAllegation: object | null;
|
||||
dateEvident: object | null;
|
||||
filesEvidence: object | null;
|
||||
filesRecordAccuser: object | null;
|
||||
filesWitnesses: object | null;
|
||||
filesEtc: object | null;
|
||||
casefault: object | null;
|
||||
typefault: object | null;
|
||||
faultLevel: object | null;
|
||||
refLaw: object | null;
|
||||
detailComplaint: object | null;
|
||||
whereInvestigate: object | null;
|
||||
trueDetail: object | null;
|
||||
evidence: object | null;
|
||||
recordAccuser: object | null;
|
||||
witnesses: object | null;
|
||||
InvestResults: object | null;
|
||||
interface DisciplinaryRef {
|
||||
respondentType: object | null;
|
||||
organizationId: object | null;
|
||||
disciplinaryDateAllegation: object | null;
|
||||
disciplinaryDateEvident: object | null;
|
||||
disciplinaryCaseFault: object | null;
|
||||
disciplinaryInvestigateAt: object | null;
|
||||
disciplinaryFaultLevel: object | null;
|
||||
disciplinaryRefLaw: object | null;
|
||||
disciplinarySummaryEvidence: object | null;
|
||||
disciplinaryRecordAccuser: object | null;
|
||||
disciplinaryWitnesses: object | null;
|
||||
result: object | null;
|
||||
// filesRecordAccuser: object | null;
|
||||
// filesWitnesses: object | null;
|
||||
// filesEtc: object | null;
|
||||
// casefault: object | null;
|
||||
// typefault: object | null;
|
||||
// faultLevel: object | null;
|
||||
// refLaw: object | null;
|
||||
// detailComplaint: object | null;
|
||||
// whereInvestigate: object | null;
|
||||
// trueDetail: object | null;
|
||||
// evidence: object | null;
|
||||
// recordAccuser: object | null;
|
||||
// witnesses: object | null;
|
||||
// InvestResults: object | null;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
export type { FormData, disciplinaryRef };
|
||||
export type { FormData, DisciplinaryRef, Persons, Director };
|
||||
|
|
|
|||
6
src/modules/11_discipline/interface/response/Main.ts
Normal file
6
src/modules/11_discipline/interface/response/Main.ts
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
interface DataOptionRes {
|
||||
organizationId: string;
|
||||
organizationName: string;
|
||||
}
|
||||
|
||||
export type { DataOptionRes };
|
||||
|
|
@ -9,7 +9,7 @@ import type {
|
|||
DataAdd,
|
||||
ocListType,
|
||||
} from "@/modules/11_discipline/interface/response/complaint";
|
||||
import type { ArrayPerson } from '@/modules/11_discipline/interface/request/complaint'
|
||||
import type { ArrayPerson } from "@/modules/11_discipline/interface/request/complaint";
|
||||
import type { QTableProps } from "quasar";
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import type {
|
|||
investigateDisDataRowType,
|
||||
DataOption,
|
||||
directorType,
|
||||
responseType
|
||||
responseType,
|
||||
} from "@/modules/11_discipline/interface/index/Main";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
const mixin = useCounterMixin();
|
||||
|
|
@ -24,20 +24,20 @@ export const useInvestigateDisStore = defineStore(
|
|||
{ id: "2", name: "ไม่ร้ายแรง" },
|
||||
]);
|
||||
const optionsfaultLevel = ref<DataOption[]>([
|
||||
{ id: "0", name: "ไม่ร้ายแรง" },
|
||||
{ id: "1", name: "ภาคทัณฑ์" },
|
||||
{ id: "2", name: "ตัดเงินเดือน" },
|
||||
{ id: "3", name: "ลดขั้นเงินเดือน" },
|
||||
{ id: "4", name: "ร้ายแรง" },
|
||||
{ id: "5", name: "ปลดออก" },
|
||||
{ id: "6", name: "ไล่ออก" },
|
||||
// { id: "0", name: "ไม่ร้ายแรง" },
|
||||
// { id: "1", name: "ภาคทัณฑ์" },
|
||||
// { id: "2", name: "ตัดเงินเดือน" },
|
||||
// { id: "3", name: "ลดขั้นเงินเดือน" },
|
||||
// { id: "4", name: "ร้ายแรง" },
|
||||
// { id: "5", name: "ปลดออก" },
|
||||
// { id: "6", name: "ไล่ออก" },
|
||||
]);
|
||||
async function fetchList(data: investigateDisDataRowType[]) {
|
||||
let datalist: any[] = data.map((e: any) => ({
|
||||
id: e.id,
|
||||
title: e.title,
|
||||
respondentType: e.respondentType,
|
||||
offenseDetails: e.offenseDetails,
|
||||
respondentType: convertRespondentType(e.respondentType),
|
||||
offenseDetails: convertFault(e.offenseDetails),
|
||||
disciplinaryFaultLevel: e.disciplinaryFaultLevel,
|
||||
disciplinaryCaseFault: e.disciplinaryCaseFault,
|
||||
status: e.status,
|
||||
|
|
@ -46,28 +46,40 @@ export const useInvestigateDisStore = defineStore(
|
|||
|
||||
rows.value = datalist;
|
||||
}
|
||||
async function fecthDirector(data: directorType[]) {
|
||||
let datalistDirector: responseType[] = data.map((e: directorType) => ({
|
||||
id: e.id,
|
||||
name: `${e.prefix}${e.firstName} ${e.lastName}`,
|
||||
prefix:e.prefix,
|
||||
firstName:e.firstName,
|
||||
lastName:e.lastName,
|
||||
position: e.position,
|
||||
email: e.email,
|
||||
phone: e.phone,
|
||||
}));
|
||||
rows2.value = datalistDirector;
|
||||
selected.value = rows2.value;
|
||||
// console.log(rows2.value);
|
||||
// async function fecthDirector(data: directorType[]) {
|
||||
// let datalistDirector: responseType[] = data.map((e: directorType) => ({
|
||||
// id: e.id,
|
||||
// name: `${e.prefix}${e.firstName} ${e.lastName}`,
|
||||
// prefix: e.prefix,
|
||||
// firstName: e.firstName,
|
||||
// lastName: e.lastName,
|
||||
// position: e.position,
|
||||
// email: e.email,
|
||||
// phone: e.phone,
|
||||
// }));
|
||||
// rows2.value = datalistDirector;
|
||||
// selected.value = rows2.value;
|
||||
// // console.log(rows2.value);
|
||||
// }
|
||||
|
||||
function convertRespondentType(val: string) {
|
||||
switch (val) {
|
||||
case "PERSON":
|
||||
return "บุคคล";
|
||||
case "ORGANIZATION":
|
||||
return "หน่วยงาน";
|
||||
case "BANGKOK":
|
||||
return "กรุงเทพมหานคร";
|
||||
}
|
||||
}
|
||||
|
||||
function convertFault(val: string) {
|
||||
switch (val) {
|
||||
case "0":
|
||||
case "NOT_SPECIFIED":
|
||||
return "ความผิดวินัยยังไม่ระบุ";
|
||||
case "1":
|
||||
case "NOT_DEADLY":
|
||||
return "ความผิดวินัยไม่ร้ายแรง";
|
||||
case "2":
|
||||
case "DEADLY":
|
||||
return "ความผิดวินัยร้ายแรง";
|
||||
}
|
||||
}
|
||||
|
|
@ -208,8 +220,8 @@ export const useInvestigateDisStore = defineStore(
|
|||
"position",
|
||||
"duty",
|
||||
"email",
|
||||
"telephone",
|
||||
"role",
|
||||
"phone",
|
||||
"total",
|
||||
]);
|
||||
const columnsDirector = ref<QTableProps["columns"]>([
|
||||
{
|
||||
|
|
@ -258,24 +270,25 @@ export const useInvestigateDisStore = defineStore(
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "telephone",
|
||||
name: "phone",
|
||||
align: "left",
|
||||
label: "เบอร์โทรศัพท์",
|
||||
sortable: true,
|
||||
field: "telephone",
|
||||
field: "phone",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "role",
|
||||
name: "total",
|
||||
align: "left",
|
||||
label: "จำนวนเรื่องสืบสวน",
|
||||
sortable: true,
|
||||
field: "role",
|
||||
field: "total",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
|
||||
return {
|
||||
tabMenu,
|
||||
fetchList,
|
||||
|
|
@ -283,7 +296,7 @@ export const useInvestigateDisStore = defineStore(
|
|||
rows2,
|
||||
optionsTypefault,
|
||||
optionsfaultLevel,
|
||||
fecthDirector,
|
||||
// fecthDirector,
|
||||
visibleColumns,
|
||||
columns,
|
||||
visibleColumnsDirector,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue