Refactoring code module 11_discipline
This commit is contained in:
parent
202fbf27b6
commit
9653ae78cb
58 changed files with 1021 additions and 1305 deletions
|
|
@ -1,17 +1,17 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import Form from "@/modules/11_discipline/components/1_Complaint/Form.vue";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
import Form from "@/modules/11_discipline/components/1_Complaint/Form.vue";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
|
||||||
|
|
||||||
const { showLoader, hideLoader, success, messageError } = mixin;
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const mixin = useCounterMixin();
|
||||||
|
const { showLoader, hideLoader, success, messageError } = mixin;
|
||||||
|
|
||||||
/** บันทึกข้อมูล */
|
/** บันทึกข้อมูล */
|
||||||
async function onSubmit(data: any) {
|
async function onSubmit(data: any) {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,13 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, reactive, ref } from "vue";
|
import { onMounted, reactive, ref } from "vue";
|
||||||
import Form from "@/modules/11_discipline/components/1_Complaint/Form.vue";
|
|
||||||
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
|
import config from "@/app.config";
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||||
|
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type {
|
import type {
|
||||||
FormData,
|
FormData,
|
||||||
|
|
@ -11,11 +15,8 @@ import type {
|
||||||
ArrayFileList,
|
ArrayFileList,
|
||||||
} from "@/modules/11_discipline/interface/request/complaint";
|
} from "@/modules/11_discipline/interface/request/complaint";
|
||||||
|
|
||||||
import config from "@/app.config";
|
import Form from "@/modules/11_discipline/components/1_Complaint/Form.vue";
|
||||||
import http from "@/plugins/http";
|
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
|
||||||
|
|
||||||
const mainStore = useDisciplineMainStore();
|
const mainStore = useDisciplineMainStore();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,23 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, reactive, watch, watchEffect } from "vue";
|
import { ref, onMounted, reactive, watch } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
||||||
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||||
|
|
||||||
|
import type { OptionData } from "@/modules/07_insignia/interface/index/Main";
|
||||||
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
||||||
import type {
|
import type {
|
||||||
FormData,
|
FormData,
|
||||||
ArrayFileList,
|
ArrayFileList,
|
||||||
} from "@/modules/11_discipline/interface/request/complaint";
|
} from "@/modules/11_discipline/interface/request/complaint";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
|
||||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
|
||||||
|
|
||||||
import { useRouter, useRoute } from "vue-router";
|
|
||||||
|
|
||||||
import config from "@/app.config";
|
|
||||||
import http from "@/plugins/http";
|
|
||||||
|
|
||||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||||
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
||||||
import type { OptionData } from "@/modules/07_insignia/interface/index/Main";
|
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const fileDocDataUpload = ref<File[]>([]);
|
const fileDocDataUpload = ref<File[]>([]);
|
||||||
|
|
@ -167,53 +166,6 @@ function confirmDelete(id: string) {
|
||||||
.finally(() => {});
|
.finally(() => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* เช็คข้อมูลจาก props
|
|
||||||
* เมื่อมีข้อมูล
|
|
||||||
* เก็บข้อมูลลง formData
|
|
||||||
*/
|
|
||||||
watch(props.data, async () => {
|
|
||||||
if (props.data !== null) {
|
|
||||||
if (countNum.value === 1) {
|
|
||||||
isReadonly.value = props.data.status != "NEW" ?? true;
|
|
||||||
isSave.value = false;
|
|
||||||
|
|
||||||
fileList.value = props.data.disciplineComplaintDocs;
|
|
||||||
mainStore.fetchData(props.data.persons);
|
|
||||||
|
|
||||||
formData.id = props.data.id;
|
|
||||||
formData.respondentType = props.data.respondentType;
|
|
||||||
formData.organizationId = props.data.organizationId;
|
|
||||||
formData.organization = props.data.organization;
|
|
||||||
organization.value = {
|
|
||||||
id: props.data.organizationId,
|
|
||||||
name: props.data.organization,
|
|
||||||
};
|
|
||||||
formData.consideredAgency = props.data.consideredAgency;
|
|
||||||
formData.consideredAgencyId = props.data.consideredAgencyId;
|
|
||||||
consideredAgency.value = {
|
|
||||||
id: props.data.consideredAgencyId,
|
|
||||||
name: props.data.consideredAgency,
|
|
||||||
};
|
|
||||||
formData.title = props.data.title;
|
|
||||||
formData.description = props.data.description;
|
|
||||||
formData.dateReceived = props.data.dateReceived;
|
|
||||||
formData.dateConsideration = props.data.dateConsideration;
|
|
||||||
formData.offenseDetails = props.data.offenseDetails;
|
|
||||||
formData.levelConsideration = props.data.levelConsideration;
|
|
||||||
formData.dateNotification = props.data.dateNotification;
|
|
||||||
formData.complaintFrom = props.data.complaintFrom;
|
|
||||||
formData.appellant = props.data.appellant;
|
|
||||||
formData.status = props.data.status;
|
|
||||||
formData.result = props.data.result;
|
|
||||||
formData.persons = mainStore.rowsAdd;
|
|
||||||
formData.activeId = props.data.activeId ? props.data.activeId : null;
|
|
||||||
} else if (countNum.value === 2) {
|
|
||||||
fileList.value = props.data.disciplineComplaintDocs;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ฟังชั่น รับค่าจาก คอมโพเเนน
|
* ฟังชั่น รับค่าจาก คอมโพเเนน
|
||||||
* @param returnData ค่าที่ได้คืนมา
|
* @param returnData ค่าที่ได้คืนมา
|
||||||
|
|
@ -296,12 +248,6 @@ async function getOc(activeId: string) {
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
|
|
||||||
// http.get(config.API.typeOc()).then((res) => {
|
|
||||||
// const data = res.data.result;
|
|
||||||
// complainstStore.ocListFn(data);
|
|
||||||
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -309,12 +255,10 @@ async function getOc(activeId: string) {
|
||||||
* @param id id ของผู้ถูกร้อง
|
* @param id id ของผู้ถูกร้อง
|
||||||
*/
|
*/
|
||||||
function deletePerson(id: string) {
|
function deletePerson(id: string) {
|
||||||
// dialogRemove($q, () => {
|
|
||||||
const dataRow = mainStore.rowsAdd;
|
const dataRow = mainStore.rowsAdd;
|
||||||
const updatedRows = dataRow.filter((item: any) => item.personId !== id);
|
const updatedRows = dataRow.filter((item: any) => item.personId !== id);
|
||||||
mainStore.rowsAdd = updatedRows;
|
mainStore.rowsAdd = updatedRows;
|
||||||
changeFormData();
|
changeFormData();
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ช่องทางการร้องเรียน และฟังก์ชั่นการดึงข้อมูลช่องทางการร้องเรียนมาจาก api*/
|
/** ช่องทางการร้องเรียน และฟังก์ชั่นการดึงข้อมูลช่องทางการร้องเรียนมาจาก api*/
|
||||||
|
|
@ -365,16 +309,7 @@ function updatemodalPersonal(modal: boolean) {
|
||||||
modalPersonal.value = modal;
|
modalPersonal.value = modal;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
|
||||||
onMounted(() => {
|
|
||||||
mainStore.rowsAdd = [];
|
|
||||||
getListChannel();
|
|
||||||
|
|
||||||
getActive();
|
|
||||||
});
|
|
||||||
|
|
||||||
const optionOrganization = ref<any[]>(complainstStore.organizationIdOp);
|
const optionOrganization = ref<any[]>(complainstStore.organizationIdOp);
|
||||||
|
|
||||||
function filterOptionFnOrganization(val: string, update: Function) {
|
function filterOptionFnOrganization(val: string, update: Function) {
|
||||||
update(() => {
|
update(() => {
|
||||||
optionOrganization.value = complainstStore.organizationIdOp.filter(
|
optionOrganization.value = complainstStore.organizationIdOp.filter(
|
||||||
|
|
@ -383,7 +318,6 @@ function filterOptionFnOrganization(val: string, update: Function) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const optionAgency = ref<any[]>(complainstStore.consideredAgencytoptions);
|
const optionAgency = ref<any[]>(complainstStore.consideredAgencytoptions);
|
||||||
|
|
||||||
function filterOptionFnAgency(val: string, update: Function) {
|
function filterOptionFnAgency(val: string, update: Function) {
|
||||||
update(() => {
|
update(() => {
|
||||||
optionAgency.value = complainstStore.consideredAgencytoptions.filter(
|
optionAgency.value = complainstStore.consideredAgencytoptions.filter(
|
||||||
|
|
@ -391,6 +325,61 @@ function filterOptionFnAgency(val: string, update: Function) {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* เช็คข้อมูลจาก props
|
||||||
|
* เมื่อมีข้อมูล
|
||||||
|
* เก็บข้อมูลลง formData
|
||||||
|
*/
|
||||||
|
watch(props.data, async () => {
|
||||||
|
if (props.data !== null) {
|
||||||
|
if (countNum.value === 1) {
|
||||||
|
isReadonly.value = props.data.status != "NEW" ?? true;
|
||||||
|
isSave.value = false;
|
||||||
|
|
||||||
|
fileList.value = props.data.disciplineComplaintDocs;
|
||||||
|
mainStore.fetchData(props.data.persons);
|
||||||
|
|
||||||
|
formData.id = props.data.id;
|
||||||
|
formData.respondentType = props.data.respondentType;
|
||||||
|
formData.organizationId = props.data.organizationId;
|
||||||
|
formData.organization = props.data.organization;
|
||||||
|
organization.value = {
|
||||||
|
id: props.data.organizationId,
|
||||||
|
name: props.data.organization,
|
||||||
|
};
|
||||||
|
formData.consideredAgency = props.data.consideredAgency;
|
||||||
|
formData.consideredAgencyId = props.data.consideredAgencyId;
|
||||||
|
consideredAgency.value = {
|
||||||
|
id: props.data.consideredAgencyId,
|
||||||
|
name: props.data.consideredAgency,
|
||||||
|
};
|
||||||
|
formData.title = props.data.title;
|
||||||
|
formData.description = props.data.description;
|
||||||
|
formData.dateReceived = props.data.dateReceived;
|
||||||
|
formData.dateConsideration = props.data.dateConsideration;
|
||||||
|
formData.offenseDetails = props.data.offenseDetails;
|
||||||
|
formData.levelConsideration = props.data.levelConsideration;
|
||||||
|
formData.dateNotification = props.data.dateNotification;
|
||||||
|
formData.complaintFrom = props.data.complaintFrom;
|
||||||
|
formData.appellant = props.data.appellant;
|
||||||
|
formData.status = props.data.status;
|
||||||
|
formData.result = props.data.result;
|
||||||
|
formData.persons = mainStore.rowsAdd;
|
||||||
|
formData.activeId = props.data.activeId ? props.data.activeId : null;
|
||||||
|
} else if (countNum.value === 2) {
|
||||||
|
fileList.value = props.data.disciplineComplaintDocs;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
||||||
|
onMounted(() => {
|
||||||
|
mainStore.rowsAdd = [];
|
||||||
|
getListChannel();
|
||||||
|
|
||||||
|
getActive();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
||||||
|
|
@ -32,12 +32,14 @@ const rowsPerPage = ref<number>(10);
|
||||||
const toptitle = ref<number>(0);
|
const toptitle = ref<number>(0);
|
||||||
const statusFilter = ref<string>("NEW");
|
const statusFilter = ref<string>("NEW");
|
||||||
const option = ref<any[]>(complainstStore.statusOptions);
|
const option = ref<any[]>(complainstStore.statusOptions);
|
||||||
|
|
||||||
async function updatePagingProp(rowPerpage: number, pageCurrent: number) {
|
async function updatePagingProp(rowPerpage: number, pageCurrent: number) {
|
||||||
rowsPerPage.value = rowPerpage;
|
rowsPerPage.value = rowPerpage;
|
||||||
page.value = pageCurrent;
|
page.value = pageCurrent;
|
||||||
await getList();
|
await getList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** ดึงข้อมูล เรื่องร้องเรียน */
|
||||||
async function getList() {
|
async function getList() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
|
|
@ -69,10 +71,7 @@ function redirectToPageadd() {
|
||||||
router.push(`/discipline/complaints/add`);
|
router.push(`/discipline/complaints/add`);
|
||||||
}
|
}
|
||||||
|
|
||||||
function filterFn() {
|
/** ล้างค่าใน input */
|
||||||
getList();
|
|
||||||
}
|
|
||||||
|
|
||||||
function resetFilter() {
|
function resetFilter() {
|
||||||
filterKeyword.value = "";
|
filterKeyword.value = "";
|
||||||
if (filterRef.value) {
|
if (filterRef.value) {
|
||||||
|
|
@ -165,7 +164,7 @@ onMounted(async () => {
|
||||||
ref="filterRef"
|
ref="filterRef"
|
||||||
outlined
|
outlined
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
@keydown.enter.prevent="filterFn"
|
@keydown.enter.prevent="getList()"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon v-if="filterKeyword == ''" name="search" />
|
<q-icon v-if="filterKeyword == ''" name="search" />
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,14 @@ function updateProp(newPagination: any, page: number) {
|
||||||
emit("update:pagination", newPagination, page);
|
emit("update:pagination", newPagination, page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ฟังชั่นสำหรับ เปลี่ยน route ตาม id ที่รับมา
|
||||||
|
* @param id ไอดีระบุ
|
||||||
|
*/
|
||||||
|
function onDetail(id: string) {
|
||||||
|
router.push(`/discipline/complaints-detail/${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => currentPage.value,
|
() => currentPage.value,
|
||||||
() => {
|
() => {
|
||||||
|
|
@ -160,14 +168,6 @@ watch(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
|
||||||
* ฟังชั่นสำหรับ เปลี่ยน route ตาม id ที่รับมา
|
|
||||||
* @param id ไอดีระบุ
|
|
||||||
*/
|
|
||||||
function onDetail(id: string) {
|
|
||||||
router.push(`/discipline/complaints-detail/${id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** เริ่มโหลดหน้า page เอาข้อมูลไปเก็บ ใน store*/
|
/** เริ่มโหลดหน้า page เอาข้อมูลไปเก็บ ใน store*/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
complainstStore.columns = columns.value;
|
complainstStore.columns = columns.value;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Form from "@/modules/11_discipline/components/2_InvestigateFacts/Form.vue";
|
import Form from "@/modules/11_discipline/components/2_InvestigateFacts/Form.vue";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,20 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch, type PropType } from "vue";
|
import { ref, watch, type PropType } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
import moment from "moment";
|
||||||
|
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
import type { CalendarOptions } from "@fullcalendar/core";
|
||||||
|
import type { DataDateMonthObject } from "@/modules/09_leave/interface/response/leave";
|
||||||
|
import type { ExtendHistoryObject } from "@/modules/11_discipline/interface/response/Main";
|
||||||
|
|
||||||
import FullCalendar from "@fullcalendar/vue3";
|
import FullCalendar from "@fullcalendar/vue3";
|
||||||
import dayGridPlugin from "@fullcalendar/daygrid";
|
import dayGridPlugin from "@fullcalendar/daygrid";
|
||||||
import timeGridPlugin from "@fullcalendar/timegrid";
|
import timeGridPlugin from "@fullcalendar/timegrid";
|
||||||
import interactionPlugin from "@fullcalendar/interaction";
|
import interactionPlugin from "@fullcalendar/interaction";
|
||||||
import allLocales from "@fullcalendar/core/locales-all";
|
import allLocales from "@fullcalendar/core/locales-all";
|
||||||
import listPlugin from "@fullcalendar/list";
|
import listPlugin from "@fullcalendar/list";
|
||||||
import moment from "moment";
|
|
||||||
|
|
||||||
import type { CalendarOptions } from "@fullcalendar/core";
|
|
||||||
import type { DataDateMonthObject } from "@/modules/09_leave/interface/response/leave";
|
|
||||||
import type { ExtendHistoryObject } from "@/modules/11_discipline/interface/response/Main";
|
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
|
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
const { monthYear2Thai, showLoader, hideLoader, messageError, dateToISO } =
|
const { monthYear2Thai, showLoader, hideLoader, messageError, dateToISO } =
|
||||||
|
|
@ -36,7 +37,7 @@ const props = defineProps({
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
close: {
|
close: {
|
||||||
type: Boolean,
|
type: Function,
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
@ -163,7 +164,7 @@ watch(
|
||||||
unelevated
|
unelevated
|
||||||
round
|
round
|
||||||
dense
|
dense
|
||||||
@click="props.close"
|
@click="props.close?.()"
|
||||||
style="color: #ff8080; background-color: #ffdede"
|
style="color: #ff8080; background-color: #ffdede"
|
||||||
/>
|
/>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,25 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import FullCalendar from "@fullcalendar/vue3";
|
import { useQuasar } from "quasar";
|
||||||
import dayGridPlugin from "@fullcalendar/daygrid";
|
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import type { DataDateMonthObject } from "@/modules/09_leave/interface/response/leave";
|
||||||
|
|
||||||
import type { CalendarOptions } from "@fullcalendar/core";
|
import type { CalendarOptions } from "@fullcalendar/core";
|
||||||
|
|
||||||
import timeGridPlugin from "@fullcalendar/timegrid";
|
import timeGridPlugin from "@fullcalendar/timegrid";
|
||||||
import interactionPlugin from "@fullcalendar/interaction";
|
import interactionPlugin from "@fullcalendar/interaction";
|
||||||
import allLocales from "@fullcalendar/core/locales-all";
|
import allLocales from "@fullcalendar/core/locales-all";
|
||||||
import listPlugin from "@fullcalendar/list";
|
import listPlugin from "@fullcalendar/list";
|
||||||
import { useQuasar } from "quasar";
|
import FullCalendar from "@fullcalendar/vue3";
|
||||||
import config from "@/app.config";
|
import dayGridPlugin from "@fullcalendar/daygrid";
|
||||||
import http from "@/plugins/http";
|
|
||||||
|
|
||||||
import type { DataDateMonthObject } from "@/modules/09_leave/interface/response/leave";
|
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
|
|
||||||
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
const { monthYear2Thai, showLoader, hideLoader, messageError } = mixin;
|
const { monthYear2Thai, showLoader, hideLoader, messageError } = mixin;
|
||||||
|
|
||||||
const $q = useQuasar();
|
|
||||||
/**
|
/**
|
||||||
* Option ของปฏิทิน
|
* Option ของปฏิทิน
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,15 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, reactive, ref, watch } from "vue";
|
import { onMounted, reactive, ref, watch } from "vue";
|
||||||
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
|
||||||
import FormInvestigatefacts from "@/modules/11_discipline/components/2_InvestigateFacts/Form.vue"; //สืบสวนข้อเท็จจริง
|
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
||||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
import type { ArrayPersonAdd } from "../../interface/response/investigate";
|
||||||
import type { FormData } from "@/modules/11_discipline/interface/request/investigateFact";
|
import type { FormData } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||||
import type {
|
import type {
|
||||||
FormData as FormDataComplaint,
|
FormData as FormDataComplaint,
|
||||||
|
|
@ -15,9 +17,9 @@ import type {
|
||||||
ArrayFileList,
|
ArrayFileList,
|
||||||
} from "@/modules/11_discipline/interface/request/complaint";
|
} from "@/modules/11_discipline/interface/request/complaint";
|
||||||
|
|
||||||
import config from "@/app.config";
|
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
||||||
import http from "@/plugins/http";
|
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
||||||
import type { ArrayPersonAdd } from "../../interface/response/investigate";
|
import FormInvestigatefacts from "@/modules/11_discipline/components/2_InvestigateFacts/Form.vue"; //สืบสวนข้อเท็จจริง
|
||||||
|
|
||||||
const mainStore = useDisciplineMainStore();
|
const mainStore = useDisciplineMainStore();
|
||||||
|
|
||||||
|
|
@ -110,6 +112,7 @@ const dataComplaints = reactive<FormDataComplaint>({
|
||||||
disciplineComplaintDocs: [fileListObjComplaint],
|
disciplineComplaintDocs: [fileListObjComplaint],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/** ดึงข้อมูลร้องเรียน */
|
||||||
async function getDataComplaint() {
|
async function getDataComplaint() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
|
|
@ -148,6 +151,7 @@ async function getDataComplaint() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** ดึงข้อมูลรายละเอียด */
|
||||||
function getData() {
|
function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
|
|
@ -228,6 +232,7 @@ function sentInvestigate() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** ส่งไปสอบสวน */
|
||||||
function sentConfirmNoPerson() {
|
function sentConfirmNoPerson() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
|
|
@ -246,6 +251,7 @@ function sentConfirmNoPerson() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** ปิด popup */
|
||||||
function closePopup() {
|
function closePopup() {
|
||||||
modalPopup.value = false;
|
modalPopup.value = false;
|
||||||
}
|
}
|
||||||
|
|
@ -320,14 +326,6 @@ function emitPerson(data: FormData[]) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
|
||||||
onMounted(() => {
|
|
||||||
getData();
|
|
||||||
if (store.tabMenu == "complaints") {
|
|
||||||
getDataComplaint();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => store.tabMenu,
|
() => store.tabMenu,
|
||||||
() => {
|
() => {
|
||||||
|
|
@ -338,6 +336,14 @@ watch(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
||||||
|
onMounted(() => {
|
||||||
|
getData();
|
||||||
|
if (store.tabMenu == "complaints") {
|
||||||
|
getDataComplaint();
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
||||||
|
|
@ -1,33 +1,32 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useRouter, useRoute } from "vue-router";
|
|
||||||
import { onMounted, ref, watch, reactive, computed } from "vue";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
import { onMounted, ref, watch, reactive, computed } from "vue";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
|
||||||
import DialogDirector from "@/modules/11_discipline/components/DialogDirector.vue";
|
import config from "@/app.config";
|
||||||
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
import http from "@/plugins/http";
|
||||||
import Table from "@/modules/11_discipline/components/DirectorTable.vue";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
||||||
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
||||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||||
|
|
||||||
|
import type { FormData } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||||
|
import type { OptionData } from "@/modules/07_insignia/interface/index/Main";
|
||||||
|
|
||||||
import CalandarDialog from "@/modules/11_discipline/components/2_InvestigateFacts/CalandarDialog.vue";
|
import CalandarDialog from "@/modules/11_discipline/components/2_InvestigateFacts/CalandarDialog.vue";
|
||||||
import DialogDuty from "@/modules/11_discipline/components/DialogDuty.vue";
|
import DialogDuty from "@/modules/11_discipline/components/DialogDuty.vue";
|
||||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||||
|
import Table from "@/modules/11_discipline/components/DirectorTable.vue";
|
||||||
import type { FormData } from "@/modules/11_discipline/interface/request/investigateFact";
|
import DialogDirector from "@/modules/11_discipline/components/DialogDirector.vue";
|
||||||
|
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
||||||
import config from "@/app.config";
|
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
||||||
import http from "@/plugins/http";
|
|
||||||
import type { OptionData } from "@/modules/07_insignia/interface/index/Main";
|
|
||||||
|
|
||||||
const modalPersonal = ref<boolean>(false);
|
const modalPersonal = ref<boolean>(false);
|
||||||
const personId = ref<string>("");
|
const personId = ref<string>("");
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
|
||||||
const checkRoutePermisson = ref<boolean>(
|
const checkRoutePermisson = ref<boolean>(
|
||||||
route.name == "disciplineInvestigatefactsDetail"
|
route.name == "disciplineInvestigatefactsDetail"
|
||||||
);
|
);
|
||||||
|
|
@ -150,6 +149,8 @@ const initialPagination = ref<any>({
|
||||||
rowsPerPage: 0,
|
rowsPerPage: 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const organization = ref<OptionData>();
|
||||||
|
|
||||||
const calendarModal = ref<boolean>(false);
|
const calendarModal = ref<boolean>(false);
|
||||||
const calendarModalclose = () => (calendarModal.value = !calendarModal.value);
|
const calendarModalclose = () => (calendarModal.value = !calendarModal.value);
|
||||||
|
|
||||||
|
|
@ -185,7 +186,6 @@ function onSubmit() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const organization = ref<OptionData>();
|
|
||||||
/**
|
/**
|
||||||
* ฟังชั้นคำนวณเวลาวันที่สิ้นสุดจาก วันที่สิ้นสุดการสืบสวน
|
* ฟังชั้นคำนวณเวลาวันที่สิ้นสุดจาก วันที่สิ้นสุดการสืบสวน
|
||||||
* @param val จำนวนวันที่ต้องการขยาย
|
* @param val จำนวนวันที่ต้องการขยาย
|
||||||
|
|
@ -198,6 +198,7 @@ async function calEndDate(val: string) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** reset วันที่สืบสวน */
|
||||||
function resetExtend() {
|
function resetExtend() {
|
||||||
formData.investigationDateEnd = props.data.investigationDateEnd;
|
formData.investigationDateEnd = props.data.investigationDateEnd;
|
||||||
formData.investigationDaysExtend = 0;
|
formData.investigationDaysExtend = 0;
|
||||||
|
|
@ -213,6 +214,391 @@ function clickClose() {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function uploadFileRelevant() {
|
||||||
|
const Data = new FormData();
|
||||||
|
Data.append("file", formData.evidenceFiles);
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.put(config.API.investigateRelevantUploadFile(formData.id), Data)
|
||||||
|
.then((res) => {
|
||||||
|
countNum.value = 2;
|
||||||
|
props.getData();
|
||||||
|
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(async () => {
|
||||||
|
hideLoader();
|
||||||
|
formData.evidenceFiles = null;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** อัปโหลดไฟล์ */
|
||||||
|
function uploadFile() {
|
||||||
|
const Data = new FormData();
|
||||||
|
Data.append("file", formData.documentFile);
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.put(config.API.investigateUploadFile(formData.id), Data)
|
||||||
|
.then((res) => {
|
||||||
|
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||||
|
countNum.value = 3;
|
||||||
|
props.getData();
|
||||||
|
// router.push(`/discipline/complaints`);
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(async () => {
|
||||||
|
hideLoader();
|
||||||
|
formData.documentFile = null;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ลบไฟล์
|
||||||
|
* @param id id file
|
||||||
|
*/
|
||||||
|
function deleteFileRelevant(id: string) {
|
||||||
|
dialogRemove($q, () => confirmDeleteRelevant(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ยืนยัน ลบ ไฟล์
|
||||||
|
* @param id id file
|
||||||
|
*/
|
||||||
|
function confirmDeleteRelevant(id: string) {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.delete(config.API.investigateRelevantFileDelete(formData.id, id))
|
||||||
|
.then((res) => {
|
||||||
|
success($q, `ลบไฟล์สำเร็จ`);
|
||||||
|
props.getData();
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ลบไฟล์
|
||||||
|
* @param id id file
|
||||||
|
*/
|
||||||
|
function deleteFile(id: string) {
|
||||||
|
dialogRemove($q, () => confirmDelete(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ยืนยัน ลบ ไฟล์
|
||||||
|
* @param id id file
|
||||||
|
*/
|
||||||
|
function confirmDelete(id: string) {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.delete(config.API.investigateFileDelete(formData.id, id))
|
||||||
|
.then((res) => {
|
||||||
|
success($q, `ลบไฟล์สำเร็จ`);
|
||||||
|
props.getData();
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function addPerson(data: any) {
|
||||||
|
await mainStore.fetchData(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ฟังชั่น รับค่าจาก คอมโพเเนน
|
||||||
|
* @param returnData ค่าที่ได้คืนมา
|
||||||
|
*/
|
||||||
|
function handleSave(returnData: any) {
|
||||||
|
addPerson(returnData);
|
||||||
|
changeFormData();
|
||||||
|
toggleModal();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** ดึงข้อมูล active */
|
||||||
|
async function getActive() {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.get(config.API.activeOrganization)
|
||||||
|
.then((res) => {
|
||||||
|
getOc(res.data.result.activeId);
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** ดึงข้อมูลหน่วยงาน */
|
||||||
|
async function getOc(activeId: string) {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.get(config.API.orgByIdSystem(activeId, route.meta.Key as string))
|
||||||
|
.then(async (res) => {
|
||||||
|
const data = await res.data.result.map((item: any) => ({
|
||||||
|
organizationId: item.orgTreeId,
|
||||||
|
organizationName: item.orgName,
|
||||||
|
}));
|
||||||
|
|
||||||
|
investigateFactStore.ocListFn(data);
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function updatePagingProp(rowPerpage: number, pageCurrent: number) {
|
||||||
|
rowsPerPage.value = rowPerpage;
|
||||||
|
page.value = pageCurrent;
|
||||||
|
await getList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** ดึงข้อมูลรายละเอียดสืบสวน */
|
||||||
|
async function getList() {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.get(
|
||||||
|
config.API.directorList(
|
||||||
|
page.value,
|
||||||
|
rowsPerPage.value,
|
||||||
|
filterKeyword.value
|
||||||
|
)
|
||||||
|
)
|
||||||
|
//
|
||||||
|
.then((res) => {
|
||||||
|
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
||||||
|
const data = res.data.result.data;
|
||||||
|
investigateDis.fecthDirector(data);
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* เก็บข้อมูล กรรม ลง ตัวแปร
|
||||||
|
* @param data ข้อมูลกรรมการ
|
||||||
|
*/
|
||||||
|
function returnDirector(data: any) {
|
||||||
|
const dataList = data.map((item: any) => item.id);
|
||||||
|
formData.directors = dataList;
|
||||||
|
|
||||||
|
rows.value = data;
|
||||||
|
changeFormData();
|
||||||
|
clickClose();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ลบรายชื่อบุคคล
|
||||||
|
* @param id บุคคล
|
||||||
|
*/
|
||||||
|
function deletePerson(id: string) {
|
||||||
|
changeFormData();
|
||||||
|
const dataRow = mainStore.rowsAdd;
|
||||||
|
const updatedRows = dataRow.filter((item: any) => item.personId !== id);
|
||||||
|
mainStore.rowsAdd = updatedRows;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ลบ รายชื่อ กรรมการ
|
||||||
|
* @param id กรรมการ
|
||||||
|
*/
|
||||||
|
function deleteDirector(id: string) {
|
||||||
|
changeFormData();
|
||||||
|
const dataRow = rows.value;
|
||||||
|
const updatedRows = dataRow.filter((item: any) => item.id !== id);
|
||||||
|
rows.value = updatedRows;
|
||||||
|
|
||||||
|
const dataList = updatedRows.map((item: any) => item.id);
|
||||||
|
formData.directors = dataList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** ฟังก์ชั่นเช็คการแก้ไขฟอร์มแล้วไม่ได้กดบันทึก */
|
||||||
|
function changeFormData() {
|
||||||
|
isSave.value = true;
|
||||||
|
|
||||||
|
if (organization.value) {
|
||||||
|
formData.organizationId = organization.value.id;
|
||||||
|
formData.organization = organization.value.name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** เช็ควันที่สิ้นสุดต้องมากกว่า หรือเท่ากับวันเริ่ม */
|
||||||
|
function changeFormDataDate() {
|
||||||
|
isSave.value = true;
|
||||||
|
const startDate = new Date(formData.investigationDateStart as Date);
|
||||||
|
const endDate = new Date(formData.investigationDateEnd as Date);
|
||||||
|
|
||||||
|
if (startDate > endDate) {
|
||||||
|
formData.investigationDateEnd = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** เปิด ปฏิทิน */
|
||||||
|
function calendarOpen() {
|
||||||
|
calendarModal.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** เปลี่ยนสี เมื่อ readonly
|
||||||
|
* @param val true/false
|
||||||
|
*/
|
||||||
|
function inputEdit(val: boolean) {
|
||||||
|
return {
|
||||||
|
"full-width cursor-pointer ": val,
|
||||||
|
"full-width cursor-pointer inputgreen": !val,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/** เปลี่ยนสี เมื่อ readonly
|
||||||
|
* @param val true/false
|
||||||
|
*/
|
||||||
|
function inputEditExtend(val: boolean) {
|
||||||
|
if (formData.investigationExtendHistory.length > 0) {
|
||||||
|
return {
|
||||||
|
"full-width cursor-pointer ": val,
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
"full-width cursor-pointer ": val,
|
||||||
|
"full-width cursor-pointer inputgreen": !val,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** เปิด dialog ส่งรายชื่อไปออกคำสั่งยุติเรื่อง*/
|
||||||
|
function openModal() {
|
||||||
|
modalPopup.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** ปิด dialog ส่งรายชื่อไปออกคำสั่งยุติเรื่อง*/
|
||||||
|
function closePopup() {
|
||||||
|
modalPopup.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** ดึงข้อมูลรายละเอียด */
|
||||||
|
function fetchData() {
|
||||||
|
setTimeout(() => {
|
||||||
|
props.getData();
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** ส่งรายชื่อไปออกคำสั่งยุติเรื่อง */
|
||||||
|
function emitPerson(data: FormData[]) {
|
||||||
|
const dataMapId = data.map((item: FormData) => item.id);
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.post(config.API.investigateReport(), {
|
||||||
|
Id: dataMapId,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
getActive();
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** เปิด dialog กรรมการ */
|
||||||
|
function openEditDirector(data: any) {
|
||||||
|
editDirectorId.value = data.directorId;
|
||||||
|
modalEditDirector.value = true;
|
||||||
|
dutyVal.value = data.duty;
|
||||||
|
commandNoVal.value = data.commandNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** ปิด dialog กรรมการ */
|
||||||
|
function closeEditDirector() {
|
||||||
|
modalEditDirector.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** บันทึก กรรมการ */
|
||||||
|
async function saveDuty(id: string, duty: string, resolution: string) {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.put(config.API.investigateEditDuty(formData.id, id), {
|
||||||
|
duty: duty,
|
||||||
|
commandNo: resolution,
|
||||||
|
})
|
||||||
|
.then((res: any) => {
|
||||||
|
success($q, "บันทึกสำเร็จ");
|
||||||
|
closeEditDirector();
|
||||||
|
props.getData?.();
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(async () => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** ดูข้อมูลในทะเบียนประวัติ */
|
||||||
|
function onclickViewinfo(id: string) {
|
||||||
|
modalPersonal.value = true;
|
||||||
|
personId.value = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** อัพเดต ปิด/เปิดเมนู ทะเบียนประวัติ */
|
||||||
|
function updatemodalPersonal(modal: boolean) {
|
||||||
|
modalPersonal.value = modal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function ค้นหาข้อมูลใน option
|
||||||
|
* @param val คำค้นหา
|
||||||
|
* @param update function
|
||||||
|
*/
|
||||||
|
function filterOptionFn(val: string, update: Function) {
|
||||||
|
update(() => {
|
||||||
|
option.value = investigateFactStore.organizationIdOp.filter(
|
||||||
|
(e: any) => e.name.search(val) !== -1
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function ค้นหาข้อมูลใน option
|
||||||
|
* @param val คำค้นหา
|
||||||
|
* @param update function
|
||||||
|
*/
|
||||||
|
function filterOptionFnStatusResult(val: string, update: Function) {
|
||||||
|
update(() => {
|
||||||
|
optionStatusResult.value = mainStore.statusResultOptions.filter(
|
||||||
|
(e: any) => e.name.search(val) !== -1
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* function ค้นหาข้อมูลใน option
|
||||||
|
* @param val คำค้นหา
|
||||||
|
* @param update function
|
||||||
|
*/
|
||||||
|
function filterOptionFnCauseText(val: string, update: Function) {
|
||||||
|
update(() => {
|
||||||
|
optionCauseText.value = mainStore.causeTextOptions.filter(
|
||||||
|
(e: any) => e.name.search(val) !== -1
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* เช็คข้อมูลจาก props
|
* เช็คข้อมูลจาก props
|
||||||
* เมื่อมีข้อมูล
|
* เมื่อมีข้อมูล
|
||||||
|
|
@ -322,348 +708,6 @@ watch(props.data, async () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function uploadFileRelevant() {
|
|
||||||
const Data = new FormData();
|
|
||||||
Data.append("file", formData.evidenceFiles);
|
|
||||||
showLoader();
|
|
||||||
http
|
|
||||||
.put(config.API.investigateRelevantUploadFile(formData.id), Data)
|
|
||||||
.then((res) => {
|
|
||||||
countNum.value = 2;
|
|
||||||
props.getData();
|
|
||||||
success($q, "อัปโหลดไฟล์สำเร็จ");
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(async () => {
|
|
||||||
hideLoader();
|
|
||||||
formData.evidenceFiles = null;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** อัปโหลดไฟล์ */
|
|
||||||
function uploadFile() {
|
|
||||||
const Data = new FormData();
|
|
||||||
Data.append("file", formData.documentFile);
|
|
||||||
showLoader();
|
|
||||||
http
|
|
||||||
.put(config.API.investigateUploadFile(formData.id), Data)
|
|
||||||
.then((res) => {
|
|
||||||
success($q, "อัปโหลดไฟล์สำเร็จ");
|
|
||||||
countNum.value = 3;
|
|
||||||
props.getData();
|
|
||||||
// router.push(`/discipline/complaints`);
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(async () => {
|
|
||||||
hideLoader();
|
|
||||||
formData.documentFile = null;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* เปิดลิงก์ไฟล์
|
|
||||||
* @param link รับมาเป็น https ลิงก์
|
|
||||||
*/
|
|
||||||
function downloadFile(link: string) {
|
|
||||||
window.open(link, "_blank");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* เปิดลิงก์ไฟล์
|
|
||||||
* @param link รับมาเป็น https ลิงก์
|
|
||||||
*/
|
|
||||||
function downloadFileRelevant(link: string) {
|
|
||||||
window.open(link, "_blank");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ลบไฟล์
|
|
||||||
* @param id id file
|
|
||||||
*/
|
|
||||||
function deleteFileRelevant(id: string) {
|
|
||||||
dialogRemove($q, () => confirmDeleteRelevant(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ยืนยัน ลบ ไฟล์
|
|
||||||
* @param id id file
|
|
||||||
*/
|
|
||||||
function confirmDeleteRelevant(id: string) {
|
|
||||||
showLoader();
|
|
||||||
http
|
|
||||||
.delete(config.API.investigateRelevantFileDelete(formData.id, id))
|
|
||||||
.then((res) => {
|
|
||||||
success($q, `ลบไฟล์สำเร็จ`);
|
|
||||||
props.getData();
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ลบไฟล์
|
|
||||||
* @param id id file
|
|
||||||
*/
|
|
||||||
function deleteFile(id: string) {
|
|
||||||
dialogRemove($q, () => confirmDelete(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ยืนยัน ลบ ไฟล์
|
|
||||||
* @param id id file
|
|
||||||
*/
|
|
||||||
function confirmDelete(id: string) {
|
|
||||||
showLoader();
|
|
||||||
http
|
|
||||||
.delete(config.API.investigateFileDelete(formData.id, id))
|
|
||||||
.then((res) => {
|
|
||||||
success($q, `ลบไฟล์สำเร็จ`);
|
|
||||||
props.getData();
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {});
|
|
||||||
}
|
|
||||||
async function addPerson(data: any) {
|
|
||||||
await mainStore.fetchData(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ฟังชั่น รับค่าจาก คอมโพเเนน
|
|
||||||
* @param returnData ค่าที่ได้คืนมา
|
|
||||||
*/
|
|
||||||
function handleSave(returnData: any) {
|
|
||||||
addPerson(returnData);
|
|
||||||
changeFormData();
|
|
||||||
toggleModal();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ดึงข้อมูล active */
|
|
||||||
async function getActive() {
|
|
||||||
showLoader();
|
|
||||||
await http
|
|
||||||
.get(config.API.activeOrganization)
|
|
||||||
.then((res) => {
|
|
||||||
getOc(res.data.result.activeId);
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
messageError($q, err);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getOc(activeId: string) {
|
|
||||||
showLoader();
|
|
||||||
await http
|
|
||||||
.get(config.API.orgByIdSystem(activeId, route.meta.Key as string))
|
|
||||||
.then(async (res) => {
|
|
||||||
const data = await res.data.result.map((item: any) => ({
|
|
||||||
organizationId: item.orgTreeId,
|
|
||||||
organizationName: item.orgName,
|
|
||||||
}));
|
|
||||||
|
|
||||||
investigateFactStore.ocListFn(data);
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
messageError($q, err);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
|
||||||
});
|
|
||||||
|
|
||||||
// http.get(config.API.typeOc()).then((res) => {
|
|
||||||
// const data = res.data.result;
|
|
||||||
// investigateFactStore.ocListFn(data);
|
|
||||||
// });
|
|
||||||
}
|
|
||||||
|
|
||||||
async function updatePagingProp(rowPerpage: number, pageCurrent: number) {
|
|
||||||
rowsPerPage.value = rowPerpage;
|
|
||||||
page.value = pageCurrent;
|
|
||||||
await getList();
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getList() {
|
|
||||||
showLoader();
|
|
||||||
await http
|
|
||||||
.get(
|
|
||||||
config.API.directorList(
|
|
||||||
page.value,
|
|
||||||
rowsPerPage.value,
|
|
||||||
filterKeyword.value
|
|
||||||
)
|
|
||||||
)
|
|
||||||
//
|
|
||||||
.then((res) => {
|
|
||||||
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
|
||||||
const data = res.data.result.data;
|
|
||||||
investigateDis.fecthDirector(data);
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function returnDirector(data: any) {
|
|
||||||
const dataList = data.map((item: any) => item.id);
|
|
||||||
formData.directors = dataList;
|
|
||||||
|
|
||||||
rows.value = data;
|
|
||||||
changeFormData();
|
|
||||||
clickClose();
|
|
||||||
}
|
|
||||||
|
|
||||||
function deletePerson(id: string) {
|
|
||||||
changeFormData();
|
|
||||||
const dataRow = mainStore.rowsAdd;
|
|
||||||
const updatedRows = dataRow.filter((item: any) => item.personId !== id);
|
|
||||||
mainStore.rowsAdd = updatedRows;
|
|
||||||
}
|
|
||||||
|
|
||||||
function deleteDirector(id: string) {
|
|
||||||
changeFormData();
|
|
||||||
const dataRow = rows.value;
|
|
||||||
const updatedRows = dataRow.filter((item: any) => item.id !== id);
|
|
||||||
rows.value = updatedRows;
|
|
||||||
|
|
||||||
const dataList = updatedRows.map((item: any) => item.id);
|
|
||||||
formData.directors = dataList;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ฟังก์ชั่นเช็คการแก้ไขฟอร์มแล้วไม่ได้กดบันทึก */
|
|
||||||
function changeFormData() {
|
|
||||||
isSave.value = true;
|
|
||||||
|
|
||||||
if (organization.value) {
|
|
||||||
formData.organizationId = organization.value.id;
|
|
||||||
formData.organization = organization.value.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** เช็ควันที่สิ้นสุดต้องมากกว่า หรือเท่ากับวันเริ่ม */
|
|
||||||
function changeFormDataDate() {
|
|
||||||
isSave.value = true;
|
|
||||||
const startDate = new Date(formData.investigationDateStart as Date);
|
|
||||||
const endDate = new Date(formData.investigationDateEnd as Date);
|
|
||||||
|
|
||||||
if (startDate > endDate) {
|
|
||||||
formData.investigationDateEnd = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function calendarOpen() {
|
|
||||||
calendarModal.value = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** เปลี่ยนสี เมื่อ readonly
|
|
||||||
* @param val true/false
|
|
||||||
*/
|
|
||||||
function inputEdit(val: boolean) {
|
|
||||||
return {
|
|
||||||
"full-width cursor-pointer ": val,
|
|
||||||
"full-width cursor-pointer inputgreen": !val,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/** เปลี่ยนสี เมื่อ readonly
|
|
||||||
* @param val true/false
|
|
||||||
*/
|
|
||||||
function inputEditExtend(val: boolean) {
|
|
||||||
if (formData.investigationExtendHistory.length > 0) {
|
|
||||||
return {
|
|
||||||
"full-width cursor-pointer ": val,
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
return {
|
|
||||||
"full-width cursor-pointer ": val,
|
|
||||||
"full-width cursor-pointer inputgreen": !val,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function openModal() {
|
|
||||||
modalPopup.value = true;
|
|
||||||
}
|
|
||||||
function closePopup() {
|
|
||||||
modalPopup.value = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function fetchData() {
|
|
||||||
setTimeout(() => {
|
|
||||||
props.getData();
|
|
||||||
}, 500);
|
|
||||||
}
|
|
||||||
|
|
||||||
function emitPerson(data: FormData[]) {
|
|
||||||
const dataMapId = data.map((item: FormData) => item.id);
|
|
||||||
showLoader();
|
|
||||||
http
|
|
||||||
.post(config.API.investigateReport(), {
|
|
||||||
Id: dataMapId,
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
getActive();
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function openEditDirector(data: any) {
|
|
||||||
editDirectorId.value = data.directorId;
|
|
||||||
modalEditDirector.value = true;
|
|
||||||
dutyVal.value = data.duty;
|
|
||||||
commandNoVal.value = data.commandNo;
|
|
||||||
}
|
|
||||||
|
|
||||||
function closeEditDirector() {
|
|
||||||
modalEditDirector.value = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function saveDuty(id: string, duty: string, resolution: string) {
|
|
||||||
showLoader();
|
|
||||||
await http
|
|
||||||
.put(config.API.investigateEditDuty(formData.id, id), {
|
|
||||||
duty: duty,
|
|
||||||
commandNo: resolution,
|
|
||||||
})
|
|
||||||
.then((res: any) => {
|
|
||||||
success($q, "บันทึกสำเร็จ");
|
|
||||||
closeEditDirector();
|
|
||||||
props.getData?.();
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(async () => {
|
|
||||||
hideLoader();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function onclickViewinfo(id: string) {
|
|
||||||
modalPersonal.value = true;
|
|
||||||
personId.value = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
function updatemodalPersonal(modal: boolean) {
|
|
||||||
modalPersonal.value = modal;
|
|
||||||
}
|
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => formData.investigationDetail,
|
() => formData.investigationDetail,
|
||||||
(newValue, oldValue) => {
|
(newValue, oldValue) => {
|
||||||
|
|
@ -690,44 +734,6 @@ watch(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
|
||||||
* function ค้นหาข้อมูลใน option
|
|
||||||
* @param val คำค้นหา
|
|
||||||
* @param update function
|
|
||||||
*/
|
|
||||||
function filterOptionFn(val: string, update: Function) {
|
|
||||||
update(() => {
|
|
||||||
option.value = investigateFactStore.organizationIdOp.filter(
|
|
||||||
(e: any) => e.name.search(val) !== -1
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* function ค้นหาข้อมูลใน option
|
|
||||||
* @param val คำค้นหา
|
|
||||||
* @param update function
|
|
||||||
*/
|
|
||||||
function filterOptionFnStatusResult(val: string, update: Function) {
|
|
||||||
update(() => {
|
|
||||||
optionStatusResult.value = mainStore.statusResultOptions.filter(
|
|
||||||
(e: any) => e.name.search(val) !== -1
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* function ค้นหาข้อมูลใน option
|
|
||||||
* @param val คำค้นหา
|
|
||||||
* @param update function
|
|
||||||
*/
|
|
||||||
function filterOptionFnCauseText(val: string, update: Function) {
|
|
||||||
update(() => {
|
|
||||||
optionCauseText.value = mainStore.causeTextOptions.filter(
|
|
||||||
(e: any) => e.name.search(val) !== -1
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
mainStore.rowsAdd = [];
|
mainStore.rowsAdd = [];
|
||||||
getActive();
|
getActive();
|
||||||
|
|
|
||||||
|
|
@ -1,32 +1,24 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, useAttrs, onMounted, watch } from "vue";
|
|
||||||
|
|
||||||
import router from "@/router";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { ref, useAttrs, onMounted, watch } from "vue";
|
||||||
|
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
import router from "@/router";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
|
|
||||||
const dataInvestigate = useInvestigateFactStore();
|
|
||||||
const mixin = useCounterMixin();
|
|
||||||
const { messageError, showLoader, hideLoader } = mixin;
|
|
||||||
const option = ref<any[]>(dataInvestigate.statusOptions);
|
|
||||||
const $q = useQuasar(); //ใช้ noti quasar
|
const $q = useQuasar(); //ใช้ noti quasar
|
||||||
|
const mixin = useCounterMixin();
|
||||||
|
const dataInvestigate = useInvestigateFactStore();
|
||||||
|
const { messageError, showLoader, hideLoader } = mixin;
|
||||||
|
|
||||||
|
const option = ref<any[]>(dataInvestigate.statusOptions);
|
||||||
|
|
||||||
/** ค้นหาข้อมูลในตาราง */
|
/** ค้นหาข้อมูลในตาราง */
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
const filterRef = ref<HTMLInputElement | null>(null);
|
const filterRef = ref<HTMLInputElement | null>(null);
|
||||||
function resetFilter() {
|
|
||||||
filterKeyword.value = "";
|
|
||||||
if (filterRef.value) {
|
|
||||||
filterRef.value.focus();
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const statusFilter = ref<string>("NEW");
|
const statusFilter = ref<string>("NEW");
|
||||||
const currentPage = ref<number>(1);
|
const currentPage = ref<number>(1);
|
||||||
const maxPage = ref<number>(1);
|
const maxPage = ref<number>(1);
|
||||||
|
|
@ -43,23 +35,18 @@ const pagination = ref({
|
||||||
rowsPerPage: rowsPerPage.value,
|
rowsPerPage: rowsPerPage.value,
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(
|
const attrs = ref<any>(useAttrs());
|
||||||
() => currentPage.value,
|
|
||||||
() => {
|
/** ล้างค่า Input */
|
||||||
rowsPerPage.value = pagination.value.rowsPerPage;
|
function resetFilter() {
|
||||||
|
filterKeyword.value = "";
|
||||||
|
if (filterRef.value) {
|
||||||
|
filterRef.value.focus();
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
);
|
}
|
||||||
|
|
||||||
watch(
|
|
||||||
() => pagination.value.rowsPerPage,
|
|
||||||
() => {
|
|
||||||
rowsPerPage.value = pagination.value.rowsPerPage;
|
|
||||||
currentPage.value = 1;
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
|
/** ดึงข้อมูลบสวน */
|
||||||
async function getList() {
|
async function getList() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
|
|
@ -86,8 +73,6 @@ async function getList() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const attrs = ref<any>(useAttrs());
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ไปหน้าแก้ไข
|
* ไปหน้าแก้ไข
|
||||||
* @param id ไอดีเฉพาะ รายบุคคล
|
* @param id ไอดีเฉพาะ รายบุคคล
|
||||||
|
|
@ -105,10 +90,6 @@ async function detailPage(id: string) {
|
||||||
router.push(`/discipline-detail/investigatefacts/${id}`);
|
router.push(`/discipline-detail/investigatefacts/${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
function filterFn() {
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* function ค้นหาข้อมูลใน option
|
* function ค้นหาข้อมูลใน option
|
||||||
* @param val คำค้นหา
|
* @param val คำค้นหา
|
||||||
|
|
@ -123,6 +104,23 @@ function filterOptionFn(val: string, update: Function) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => currentPage.value,
|
||||||
|
() => {
|
||||||
|
rowsPerPage.value = pagination.value.rowsPerPage;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => pagination.value.rowsPerPage,
|
||||||
|
() => {
|
||||||
|
rowsPerPage.value = pagination.value.rowsPerPage;
|
||||||
|
currentPage.value = 1;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
/**เมื่อเริ่มโหลดหน้า
|
/**เมื่อเริ่มโหลดหน้า
|
||||||
* ส่งข้อมูลจำลองไปยัง store
|
* ส่งข้อมูลจำลองไปยัง store
|
||||||
*/
|
*/
|
||||||
|
|
@ -180,7 +178,7 @@ onMounted(async () => {
|
||||||
ref="filterRef"
|
ref="filterRef"
|
||||||
outlined
|
outlined
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
@keydown.enter.prevent="filterFn"
|
@keydown.enter.prevent="getList()"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon v-if="filterKeyword == ''" name="search" />
|
<q-icon v-if="filterKeyword == ''" name="search" />
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Form from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue";
|
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
|
||||||
|
import Form from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
/** บันทึกข้อมูลเเละ route กลับหน้าหลัก */
|
/** บันทึกข้อมูลเเละ route กลับหน้าหลัก */
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
import { ref, watch, type PropType } from "vue";
|
import { ref, watch, type PropType } from "vue";
|
||||||
|
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
import FullCalendar from "@fullcalendar/vue3";
|
import FullCalendar from "@fullcalendar/vue3";
|
||||||
import dayGridPlugin from "@fullcalendar/daygrid";
|
import dayGridPlugin from "@fullcalendar/daygrid";
|
||||||
import type { CalendarOptions } from "@fullcalendar/core";
|
import type { CalendarOptions } from "@fullcalendar/core";
|
||||||
|
|
@ -34,7 +34,7 @@ const props = defineProps({
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
close: {
|
close: {
|
||||||
type: Boolean,
|
type: Function,
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
@ -162,7 +162,7 @@ watch(
|
||||||
unelevated
|
unelevated
|
||||||
round
|
round
|
||||||
dense
|
dense
|
||||||
@click="props.close"
|
@click="props.close?.()"
|
||||||
style="color: #ff8080; background-color: #ffdede"
|
style="color: #ff8080; background-color: #ffdede"
|
||||||
/>
|
/>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,25 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import FullCalendar from "@fullcalendar/vue3";
|
import FullCalendar from "@fullcalendar/vue3";
|
||||||
import dayGridPlugin from "@fullcalendar/daygrid";
|
import dayGridPlugin from "@fullcalendar/daygrid";
|
||||||
|
|
||||||
|
import config from "@/app.config";
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
import type { DataDateMonthObject } from "@/modules/09_leave/interface/response/leave";
|
||||||
import type { CalendarOptions } from "@fullcalendar/core";
|
import type { CalendarOptions } from "@fullcalendar/core";
|
||||||
|
|
||||||
import timeGridPlugin from "@fullcalendar/timegrid";
|
import timeGridPlugin from "@fullcalendar/timegrid";
|
||||||
import interactionPlugin from "@fullcalendar/interaction";
|
import interactionPlugin from "@fullcalendar/interaction";
|
||||||
import allLocales from "@fullcalendar/core/locales-all";
|
import allLocales from "@fullcalendar/core/locales-all";
|
||||||
import listPlugin from "@fullcalendar/list";
|
import listPlugin from "@fullcalendar/list";
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
import config from "@/app.config";
|
|
||||||
import http from "@/plugins/http";
|
|
||||||
|
|
||||||
import type { DataDateMonthObject } from "@/modules/09_leave/interface/response/leave";
|
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
|
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
|
||||||
const { monthYear2Thai, showLoader, hideLoader, messageError } = mixin;
|
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
|
const { monthYear2Thai, showLoader, hideLoader, messageError } = mixin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Option ของปฏิทิน
|
* Option ของปฏิทิน
|
||||||
|
|
@ -128,6 +129,44 @@ const reason = ref("ยกเลิกการลา");
|
||||||
const model = ref(null);
|
const model = ref(null);
|
||||||
const modeCancel = ref(true);
|
const modeCancel = ref(true);
|
||||||
|
|
||||||
|
const dateMonth = ref<DataDateMonthObject>({
|
||||||
|
month: new Date().getMonth(),
|
||||||
|
year: new Date().getFullYear(),
|
||||||
|
});
|
||||||
|
|
||||||
|
const dateYear = ref<number>(new Date().getFullYear());
|
||||||
|
async function updateMonth(e: DataDateMonthObject) {
|
||||||
|
if (e != null) {
|
||||||
|
dateYear.value = e.year;
|
||||||
|
|
||||||
|
changCalendar();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ฟังก์ชั่นยกเลิก model
|
||||||
|
* @param text
|
||||||
|
*/
|
||||||
|
async function cancel(text: string) {
|
||||||
|
title.value = text;
|
||||||
|
modalCancel.value = true;
|
||||||
|
modeCancel.value = true;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* ฟังก์ชั่นเปิด model
|
||||||
|
* @param text
|
||||||
|
*/
|
||||||
|
async function view(text: string) {
|
||||||
|
title.value = text;
|
||||||
|
modalCancel.value = true;
|
||||||
|
modeCancel.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function monthYearThai(val: DataDateMonthObject) {
|
||||||
|
if (val == null) return "";
|
||||||
|
else return monthYear2Thai(val.month, val.year);
|
||||||
|
}
|
||||||
|
|
||||||
async function fetchCalendar() {
|
async function fetchCalendar() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
|
|
@ -151,74 +190,16 @@ async function fetchCalendar() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function changCalendar() {
|
||||||
|
fetchCalendar();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* เรียกฟังก์ชันทั้งหมดตอนเรียกใช้ไฟล์นี้
|
* เรียกฟังก์ชันทั้งหมดตอนเรียกใช้ไฟล์นี้
|
||||||
*/
|
*/
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
fetchCalendar();
|
fetchCalendar();
|
||||||
});
|
});
|
||||||
|
|
||||||
function changCalendar() {
|
|
||||||
fetchCalendar();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ฟังก์ชั่นยกเลิก model
|
|
||||||
* @param text
|
|
||||||
*/
|
|
||||||
const cancel = async (text: string) => {
|
|
||||||
title.value = text;
|
|
||||||
modalCancel.value = true;
|
|
||||||
modeCancel.value = true;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* ฟังก์ชั่นเปิด model
|
|
||||||
* @param text
|
|
||||||
*/
|
|
||||||
const view = async (text: string) => {
|
|
||||||
title.value = text;
|
|
||||||
modalCancel.value = true;
|
|
||||||
modeCancel.value = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
// filter calendar left
|
|
||||||
const filterLists = ref<any[]>([
|
|
||||||
{
|
|
||||||
id: "x1",
|
|
||||||
name: "นางสาววารุณี แต้มคู",
|
|
||||||
color: "green",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "x2",
|
|
||||||
name: "นางสาวสมศรี ใจดี",
|
|
||||||
color: "grey",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "x3",
|
|
||||||
name: "นายสมชาย สุขใจ",
|
|
||||||
color: "grey",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
const filterVal = ref(["x1"]);
|
|
||||||
|
|
||||||
const dateMonth = ref<DataDateMonthObject>({
|
|
||||||
month: new Date().getMonth(),
|
|
||||||
year: new Date().getFullYear(),
|
|
||||||
});
|
|
||||||
|
|
||||||
const dateYear = ref<number>(new Date().getFullYear());
|
|
||||||
const updateMonth = async (e: DataDateMonthObject) => {
|
|
||||||
if (e != null) {
|
|
||||||
dateYear.value = e.year;
|
|
||||||
|
|
||||||
changCalendar();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const monthYearThai = (val: DataDateMonthObject) => {
|
|
||||||
if (val == null) return "";
|
|
||||||
else return monthYear2Thai(val.month, val.year);
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="q-ma-sm">
|
<div class="q-ma-sm">
|
||||||
|
|
@ -418,13 +399,6 @@ const monthYearThai = (val: DataDateMonthObject) => {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
/* border: 2px solid #17a259; */
|
|
||||||
/* border-radius: 50%;
|
|
||||||
height: 25px;
|
|
||||||
width: 25px;
|
|
||||||
font-weight: bold;
|
|
||||||
color: white !important;
|
|
||||||
background: #17a259; */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.fc-day-today .fc-daygrid-day-frame {
|
.fc-day-today .fc-daygrid-day-frame {
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,9 @@ import { useRouter, useRoute } from "vue-router";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
/**import component*/
|
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
||||||
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||||
import FormInvestigatefacts from "@/modules/11_discipline/components/2_InvestigateFacts/Form.vue"; //สืบสวนข้อเท็จจริง
|
|
||||||
import FormDisciplinary from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue"; // สอบสวนความผิดทางวินัย
|
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
PersonsArray,
|
PersonsArray,
|
||||||
|
|
@ -23,20 +21,19 @@ import type {
|
||||||
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/investigateFact";
|
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||||
|
|
||||||
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
||||||
|
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
||||||
|
import FormInvestigatefacts from "@/modules/11_discipline/components/2_InvestigateFacts/Form.vue"; //สืบสวนข้อเท็จจริง
|
||||||
|
import FormDisciplinary from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue"; // สอบสวนความผิดทางวินัย
|
||||||
|
|
||||||
/**import store*/
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
|
||||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
|
||||||
|
|
||||||
const mainStore = useDisciplineMainStore();
|
|
||||||
const isSaveInfo = ref<boolean>(false);
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const store = useInvestigateDisStore();
|
const store = useInvestigateDisStore();
|
||||||
const { dialogConfirm, success, messageError, showLoader, hideLoader } = mixin;
|
const { dialogConfirm, success, messageError, showLoader, hideLoader } = mixin;
|
||||||
const router = useRouter();
|
const mainStore = useDisciplineMainStore();
|
||||||
const route = useRoute();
|
|
||||||
|
const isSaveInfo = ref<boolean>(false);
|
||||||
const checkRoutePermisson = ref<boolean>(
|
const checkRoutePermisson = ref<boolean>(
|
||||||
route.name == "disciplineDisciplinaryDetail"
|
route.name == "disciplineDisciplinaryDetail"
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,18 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, reactive, watch, computed } from "vue";
|
import { ref, onMounted, reactive, watch, computed } from "vue";
|
||||||
import http from "@/plugins/http";
|
|
||||||
import config from "@/app.config";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
|
||||||
import CalandarDialog from "@/modules/11_discipline/components/3_InvestigateDisciplinary/CalandarDialog.vue";
|
|
||||||
/**import type*/
|
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
|
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
||||||
|
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
||||||
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
FormData,
|
FormData,
|
||||||
DisciplinaryRef,
|
|
||||||
Director,
|
Director,
|
||||||
PersonsArray,
|
PersonsArray,
|
||||||
} from "@/modules/11_discipline/interface/request/disciplinary";
|
} from "@/modules/11_discipline/interface/request/disciplinary";
|
||||||
|
|
@ -21,29 +22,19 @@ import type {
|
||||||
responseType,
|
responseType,
|
||||||
directorType,
|
directorType,
|
||||||
} from "@/modules/11_discipline/interface/index/Main";
|
} from "@/modules/11_discipline/interface/index/Main";
|
||||||
import type { DataOptionRes } from "@/modules/11_discipline/interface/response/Main";
|
import type { OptionData } from "@/modules/07_insignia/interface/index/Main";
|
||||||
|
|
||||||
/** import components*/
|
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
||||||
|
import CalandarDialog from "@/modules/11_discipline/components/3_InvestigateDisciplinary/CalandarDialog.vue";
|
||||||
|
import DialogDuty from "@/modules/11_discipline/components/DialogDuty.vue";
|
||||||
|
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||||
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
||||||
import DialogDirector from "@/modules/11_discipline/components/DialogDirector.vue";
|
import DialogDirector from "@/modules/11_discipline/components/DialogDirector.vue";
|
||||||
import Table from "@/modules/11_discipline/components/DirectorTable.vue";
|
import Table from "@/modules/11_discipline/components/DirectorTable.vue";
|
||||||
import UploadFile from "@/modules/11_discipline/components/UploadFile.vue";
|
import UploadFile from "@/modules/11_discipline/components/UploadFile.vue";
|
||||||
|
|
||||||
/** import store*/
|
const $q = useQuasar();
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
const route = useRoute();
|
||||||
import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
|
||||||
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
|
||||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
|
||||||
import DialogDuty from "@/modules/11_discipline/components/DialogDuty.vue";
|
|
||||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
|
||||||
import type { OptionData } from "@/modules/07_insignia/interface/index/Main";
|
|
||||||
|
|
||||||
const modalPersonal = ref<boolean>(false);
|
|
||||||
const personId = ref<string>("");
|
|
||||||
const isSaveInfo = defineModel<boolean>("isSaveInfo");
|
|
||||||
const calendarModal = ref<boolean>(false);
|
|
||||||
const calendarModalclose = () => (calendarModal.value = !calendarModal.value);
|
|
||||||
const modalPopup = ref<boolean>(false);
|
|
||||||
const complainstStore = useComplainstDataStore();
|
const complainstStore = useComplainstDataStore();
|
||||||
const investigateDis = useInvestigateDisStore();
|
const investigateDis = useInvestigateDisStore();
|
||||||
const mainStore = useDisciplineMainStore();
|
const mainStore = useDisciplineMainStore();
|
||||||
|
|
@ -58,9 +49,13 @@ const {
|
||||||
success,
|
success,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
const route = useRoute();
|
const modalPersonal = ref<boolean>(false);
|
||||||
const router = useRouter();
|
const personId = ref<string>("");
|
||||||
const $q = useQuasar();
|
const isSaveInfo = defineModel<boolean>("isSaveInfo");
|
||||||
|
const calendarModal = ref<boolean>(false);
|
||||||
|
const calendarModalclose = () => (calendarModal.value = !calendarModal.value);
|
||||||
|
const modalPopup = ref<boolean>(false);
|
||||||
|
|
||||||
const checkRoutePermisson = ref<boolean>(
|
const checkRoutePermisson = ref<boolean>(
|
||||||
route.name == "disciplineDisciplinaryDetail"
|
route.name == "disciplineDisciplinaryDetail"
|
||||||
);
|
);
|
||||||
|
|
@ -77,7 +72,6 @@ const dutyVal = ref<string>();
|
||||||
const commandNoVal = ref<string>();
|
const commandNoVal = ref<string>();
|
||||||
|
|
||||||
const id = ref<string>(route.params.id as string);
|
const id = ref<string>(route.params.id as string);
|
||||||
const isUpdate = ref<boolean>(false);
|
|
||||||
const type = ref<string>("");
|
const type = ref<string>("");
|
||||||
const modal = ref<boolean>(false);
|
const modal = ref<boolean>(false);
|
||||||
const rows = ref<Director[]>([]);
|
const rows = ref<Director[]>([]);
|
||||||
|
|
@ -408,18 +402,6 @@ function handleSave(returnData: any) {
|
||||||
toggleModal();
|
toggleModal();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* เช็คข้อมูลจาก props
|
|
||||||
* เมื่อมีข้อมูล
|
|
||||||
* เก็บข้อมูลลง formData
|
|
||||||
*/
|
|
||||||
watch(
|
|
||||||
() => props.data,
|
|
||||||
async () => {
|
|
||||||
await fetchDatadetail();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
/** function เรียกรายชื่อหน่วยงาน*/
|
/** function เรียกรายชื่อหน่วยงาน*/
|
||||||
/** ดึงข้อมูล active */
|
/** ดึงข้อมูล active */
|
||||||
async function getActive() {
|
async function getActive() {
|
||||||
|
|
@ -523,11 +505,6 @@ const organization = ref<OptionData>();
|
||||||
async function selectComplainant(val: string) {
|
async function selectComplainant(val: string) {
|
||||||
formData.organizationId = "";
|
formData.organizationId = "";
|
||||||
formData.consideredAgency = "";
|
formData.consideredAgency = "";
|
||||||
// if (val === "0") {
|
|
||||||
// await fetchListname(); // ถ้าเลือกบุกคลจะเรียก function fetchListname เรียกรายชื่อจากทะเบียน
|
|
||||||
// } else if (val === "1") {
|
|
||||||
// await fetchOffice(); // ถ้าเลือกหน่วยงานจะเรียก function fetchOffice เรียกโครงสร้างสำนักงาน
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ฟังก์ชั่นเช็คการแก้ไขฟอร์มแล้วไม่ได้กดบันทึก */
|
/** ฟังก์ชั่นเช็คการแก้ไขฟอร์มแล้วไม่ได้กดบันทึก */
|
||||||
|
|
@ -670,14 +647,6 @@ watch(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
watch(
|
|
||||||
() => formData.disciplinaryFaultLevel,
|
|
||||||
() => {
|
|
||||||
if (formData.disciplinaryFaultLevel !== "อื่นๆ") {
|
|
||||||
formData.disciplinaryFaultLevelOther = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
function deletePerson(id: string) {
|
function deletePerson(id: string) {
|
||||||
changeFormData();
|
changeFormData();
|
||||||
|
|
@ -738,6 +707,27 @@ function filterOptionFnCauseText(val: string, update: Function) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => formData.disciplinaryFaultLevel,
|
||||||
|
() => {
|
||||||
|
if (formData.disciplinaryFaultLevel !== "อื่นๆ") {
|
||||||
|
formData.disciplinaryFaultLevelOther = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* เช็คข้อมูลจาก props
|
||||||
|
* เมื่อมีข้อมูล
|
||||||
|
* เก็บข้อมูลลง formData
|
||||||
|
*/
|
||||||
|
watch(
|
||||||
|
() => props.data,
|
||||||
|
async () => {
|
||||||
|
await fetchDatadetail();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
/** Hook */
|
/** Hook */
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
mainStore.rowsAdd = [];
|
mainStore.rowsAdd = [];
|
||||||
|
|
|
||||||
|
|
@ -2,23 +2,21 @@
|
||||||
import { onMounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
import type { Pagination } from "@/modules/03_recruiting/interface/index/Main";
|
|
||||||
|
|
||||||
import Table from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Table.vue";
|
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
||||||
|
|
||||||
|
import Table from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Table.vue";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const dataInvestigateDis = useInvestigateDisStore();
|
const dataInvestigateDis = useInvestigateDisStore();
|
||||||
const { showLoader, hideLoader } = mixin;
|
const { showLoader, hideLoader } = mixin;
|
||||||
const { fetchList } = dataInvestigateDis;
|
const { fetchList } = dataInvestigateDis;
|
||||||
|
|
||||||
const rowsPerPage = ref<number>(10);
|
const rowsPerPage = ref<number>(10);
|
||||||
const $q = useQuasar(); // show dialog
|
|
||||||
const router = useRouter();
|
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const page = ref<number>(1);
|
const page = ref<number>(1);
|
||||||
const maxPage = ref<number>(1);
|
const maxPage = ref<number>(1);
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, useAttrs, watch } from "vue";
|
import { ref, useAttrs, watch } from "vue";
|
||||||
import type { Pagination } from "@/modules/04_registry/interface/index/Main";
|
|
||||||
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
|
||||||
|
|
||||||
|
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
|
|
||||||
const dataInvestigateDis = useInvestigateDisStore();
|
const dataInvestigateDis = useInvestigateDisStore();
|
||||||
|
|
@ -112,21 +111,6 @@ function updateProp(newPagination: any, page: number) {
|
||||||
emit("update:pagination", newPagination, page);
|
emit("update:pagination", newPagination, page);
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
|
||||||
() => currentPage.value,
|
|
||||||
() => {
|
|
||||||
updateProp(pagination.value.rowsPerPage, currentPage.value);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => pagination.value.rowsPerPage,
|
|
||||||
() => {
|
|
||||||
currentPage.value = 1;
|
|
||||||
updateProp(pagination.value.rowsPerPage, currentPage.value);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
function dataUpdate() {
|
function dataUpdate() {
|
||||||
props.filterStatus(statusFilter.value);
|
props.filterStatus(statusFilter.value);
|
||||||
}
|
}
|
||||||
|
|
@ -148,6 +132,21 @@ function filterOptionFn(val: string, update: Function) {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => currentPage.value,
|
||||||
|
() => {
|
||||||
|
updateProp(pagination.value.rowsPerPage, currentPage.value);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => pagination.value.rowsPerPage,
|
||||||
|
() => {
|
||||||
|
currentPage.value = 1;
|
||||||
|
updateProp(pagination.value.rowsPerPage, currentPage.value);
|
||||||
|
}
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,18 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch } from "vue";
|
import { ref, watch } from "vue";
|
||||||
import { QForm, useQuasar } from "quasar";
|
import { QForm, useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import type { HistoryResultCommand } from "@/modules/11_discipline/interface/index/Main";
|
||||||
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const {
|
const { showLoader, messageError, hideLoader, date2Thai } = mixin;
|
||||||
showLoader,
|
|
||||||
success,
|
|
||||||
messageError,
|
|
||||||
dialogConfirm,
|
|
||||||
hideLoader,
|
|
||||||
date2Thai,
|
|
||||||
} = mixin;
|
|
||||||
const listCheck = ref<string>("");
|
|
||||||
const id = ref<string>("");
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modal: Boolean,
|
modal: Boolean,
|
||||||
personId: {
|
personId: {
|
||||||
|
|
@ -27,7 +21,7 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
close: Function,
|
close: Function,
|
||||||
});
|
});
|
||||||
const rows = ref<any[]>([]);
|
const rows = ref<HistoryResultCommand[]>([]);
|
||||||
|
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,20 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, watchEffect, watch } from "vue";
|
import { ref, computed, watchEffect, watch } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
import type { ResponseData } from "@/modules/05_placement/interface/response/Transfer";
|
import type { ResponseData } from "@/modules/05_placement/interface/response/Transfer";
|
||||||
import type { OpType } from "@/modules/05_placement/interface/response/Main";
|
import type { OpType } from "@/modules/05_placement/interface/response/Main";
|
||||||
import type { DataListRow } from "@/modules/11_discipline/interface/request/result";
|
import type { DataListRow } from "@/modules/11_discipline/interface/request/result";
|
||||||
import { useRoute } from "vue-router";
|
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
|
||||||
import http from "@/plugins/http";
|
|
||||||
import config from "@/app.config";
|
|
||||||
const route = useRoute();
|
|
||||||
|
|
||||||
const optionsType = ref<[]>([]);
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
const idPath = ref<string>(route.params.id as string);
|
|
||||||
const type = ref<string>("");
|
|
||||||
const rows = ref<DataListRow[]>([]);
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const selected = ref<ResponseData[]>([]);
|
const route = useRoute();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const {
|
const {
|
||||||
showLoader,
|
showLoader,
|
||||||
|
|
@ -27,6 +25,12 @@ const {
|
||||||
dialogMessageNotify,
|
dialogMessageNotify,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
|
const optionsType = ref<[]>([]);
|
||||||
|
const idPath = ref<string>(route.params.id as string);
|
||||||
|
const type = ref<string>("");
|
||||||
|
const rows = ref<DataListRow[]>([]);
|
||||||
|
const selected = ref<ResponseData[]>([]);
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|
@ -90,25 +94,6 @@ async function Ordersave() {
|
||||||
props.getData?.();
|
props.getData?.();
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
// } else if (props.title == "ส่งไปออกคำสั่งงดโทษ/เพิ่มโทษ") {
|
|
||||||
// const body = {
|
|
||||||
// persons,
|
|
||||||
// };
|
|
||||||
// showLoader();
|
|
||||||
// await http
|
|
||||||
// .put(config.API.discardResult(idPath.value, type.value as string), body)
|
|
||||||
// .then((res: any) => {
|
|
||||||
// success($q, `${props.title}สำเร็จ`);
|
|
||||||
// props.closeModal?.();
|
|
||||||
// })
|
|
||||||
// .catch((e) => {
|
|
||||||
// messageError($q, e);
|
|
||||||
// })
|
|
||||||
// .finally(async () => {
|
|
||||||
// props.getData?.();
|
|
||||||
// hideLoader();
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const emit = defineEmits([
|
const emit = defineEmits([
|
||||||
|
|
@ -132,7 +117,6 @@ async function fecthTypeOption() {
|
||||||
await http
|
await http
|
||||||
.get(config.API.typeOrder())
|
.get(config.API.typeOrder())
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
// if (props.title == "ส่งไปออกคำสั่ง") {
|
|
||||||
optionsType.value = res.data.result.filter(
|
optionsType.value = res.data.result.filter(
|
||||||
(e: OpType) =>
|
(e: OpType) =>
|
||||||
e.commandCode === "C-PM-19" ||
|
e.commandCode === "C-PM-19" ||
|
||||||
|
|
@ -143,13 +127,6 @@ async function fecthTypeOption() {
|
||||||
e.commandCode === "C-PM-30" ||
|
e.commandCode === "C-PM-30" ||
|
||||||
e.commandCode === "C-PM-31"
|
e.commandCode === "C-PM-31"
|
||||||
);
|
);
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
// optionsType.value = res.data.result.filter(
|
|
||||||
// (e: OpType) =>
|
|
||||||
// e.commandCode === "C-PM-30" || e.commandCode === "C-PM-31"
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -166,15 +143,6 @@ watchEffect(() => {
|
||||||
rows.value = props.data.persons.filter(
|
rows.value = props.data.persons.filter(
|
||||||
(item: any) => item.status === "NEW"
|
(item: any) => item.status === "NEW"
|
||||||
);
|
);
|
||||||
// if (props.title == "ส่งไปออกคำสั่งลงโทษทางวินัย") {
|
|
||||||
// rows.value = props.data.persons.filter(
|
|
||||||
// (item: any) => item.status !== "REPORT"
|
|
||||||
// );
|
|
||||||
// } else if (props.title == "ส่งไปออกคำสั่งงดโทษ/เพิ่มโทษ") {
|
|
||||||
// rows.value = props.data.persons.filter(
|
|
||||||
// (item: any) => item.status == "REPORT" && item.statusDiscard == "NEW"
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, reactive, ref, watch } from "vue";
|
import { onMounted, reactive, ref, watch } from "vue";
|
||||||
|
import { useRouter, useRoute } from "vue-router";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import FormInvestigatefacts from "@/modules/11_discipline/components/2_InvestigateFacts/Form.vue"; //สืบสวนข้อเท็จจริง
|
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
||||||
import FormDisciplinary from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue"; // สอบสวนความผิดทางวินัย
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||||
import FormResult from "@/modules/11_discipline/components/4_Result/Form.vue"; // สอบสวนความผิดทางวินัย
|
|
||||||
import type { DataListRow } from "@/modules/11_discipline/interface/request/result";
|
import type { DataListRow } from "@/modules/11_discipline/interface/request/result";
|
||||||
import type {
|
import type {
|
||||||
FormData as FormDataComplaint,
|
FormData as FormDataComplaint,
|
||||||
|
|
@ -13,20 +16,21 @@ import type {
|
||||||
ArrayFileList,
|
ArrayFileList,
|
||||||
} from "@/modules/11_discipline/interface/request/complaint";
|
} from "@/modules/11_discipline/interface/request/complaint";
|
||||||
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/investigateFact";
|
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
import DialogSendToCommand from "@/modules/11_discipline/components/4_Result/DialogSendToCommand.vue";
|
|
||||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
|
||||||
|
|
||||||
const mainStore = useDisciplineMainStore();
|
import DialogSendToCommand from "@/modules/11_discipline/components/4_Result/DialogSendToCommand.vue";
|
||||||
|
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
||||||
|
import FormInvestigatefacts from "@/modules/11_discipline/components/2_InvestigateFacts/Form.vue"; //สืบสวนข้อเท็จจริง
|
||||||
|
import FormDisciplinary from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue"; // สอบสวนความผิดทางวินัย
|
||||||
|
import FormResult from "@/modules/11_discipline/components/4_Result/Form.vue"; // สอบสวนความผิดทางวินัย
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
const mainStore = useDisciplineMainStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const store = useDisciplineResultStore();
|
const store = useDisciplineResultStore();
|
||||||
const { showLoader, hideLoader, messageError } = mixin;
|
const { showLoader, hideLoader, messageError } = mixin;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
const id = ref<string>(route.params.id as string);
|
const id = ref<string>(route.params.id as string);
|
||||||
const titlePopup = ref<string>("");
|
const titlePopup = ref<string>("");
|
||||||
const idInvestigate = ref<string>("");
|
const idInvestigate = ref<string>("");
|
||||||
|
|
@ -39,6 +43,7 @@ const dataDisciplinary = ref<object>([]);
|
||||||
const checkRoutePermisson = ref<boolean>(
|
const checkRoutePermisson = ref<boolean>(
|
||||||
route.name == "disciplineResultDetail"
|
route.name == "disciplineResultDetail"
|
||||||
);
|
);
|
||||||
|
|
||||||
const dataInvestigatefacts = reactive<FormInvestigateFact>({
|
const dataInvestigatefacts = reactive<FormInvestigateFact>({
|
||||||
id: "",
|
id: "",
|
||||||
idComplaint: "",
|
idComplaint: "",
|
||||||
|
|
@ -302,12 +307,6 @@ onMounted(async () => {
|
||||||
color="public"
|
color="public"
|
||||||
@click="sentIssue('ส่งไปออกคำสั่ง')"
|
@click="sentIssue('ส่งไปออกคำสั่ง')"
|
||||||
/>
|
/>
|
||||||
<!-- <q-btn
|
|
||||||
v-if="status === 'DONE'"
|
|
||||||
label="ส่งไปออกคำสั่งงดโทษ/เพิ่มโทษ"
|
|
||||||
color="blue-6"
|
|
||||||
@click="sentIssue('ส่งไปออกคำสั่งงดโทษ/เพิ่มโทษ')"
|
|
||||||
/> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<q-card bordered flat class="col-12">
|
<q-card bordered flat class="col-12">
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,25 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, watch } from "vue";
|
import { ref, reactive, watch } from "vue";
|
||||||
import http from "@/plugins/http";
|
|
||||||
import config from "@/app.config";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
|
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
||||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||||
import DialogHistory from "@/modules/11_discipline/components/4_Result/DialogHistory.vue";
|
|
||||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
FormData,
|
FormData,
|
||||||
FormRef,
|
FormRef,
|
||||||
DataOption,
|
DataOption,
|
||||||
DataOptionRes,
|
|
||||||
FileArray,
|
|
||||||
} from "@/modules/11_discipline/interface/request/result";
|
} from "@/modules/11_discipline/interface/request/result";
|
||||||
|
|
||||||
const modalPersonal = ref<boolean>(false);
|
import DialogHistory from "@/modules/11_discipline/components/4_Result/DialogHistory.vue";
|
||||||
const personId = ref<string>("");
|
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||||
|
|
||||||
const countNum = ref<number>(1);
|
|
||||||
const mainStore = useDisciplineMainStore();
|
const mainStore = useDisciplineMainStore();
|
||||||
const modalPerson = ref<boolean>(false);
|
|
||||||
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
|
||||||
const dataStore = useDisciplineResultStore();
|
const dataStore = useDisciplineResultStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const {
|
const {
|
||||||
|
|
@ -36,8 +31,13 @@ const {
|
||||||
dialogRemove,
|
dialogRemove,
|
||||||
downloadRenameFileByLink,
|
downloadRenameFileByLink,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
const router = useRouter();
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
|
const modalPersonal = ref<boolean>(false);
|
||||||
|
const personId = ref<string>("");
|
||||||
|
const countNum = ref<number>(1);
|
||||||
|
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
||||||
|
|
||||||
const checkRoutePermisson = ref<boolean>(
|
const checkRoutePermisson = ref<boolean>(
|
||||||
route.name == "disciplineResultDetail"
|
route.name == "disciplineResultDetail"
|
||||||
);
|
);
|
||||||
|
|
@ -151,38 +151,6 @@ function onSubmit() {
|
||||||
async function fetchDatadetail() {
|
async function fetchDatadetail() {
|
||||||
formData.resultDescription = props.data.resultDescription;
|
formData.resultDescription = props.data.resultDescription;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* เช็คข้อมูลจาก props
|
|
||||||
* เมื่อมีข้อมูล
|
|
||||||
* เก็บข้อมูลลง formData
|
|
||||||
*/
|
|
||||||
watch(
|
|
||||||
() => props.data,
|
|
||||||
async () => {
|
|
||||||
if (countNum.value === 1) {
|
|
||||||
respondentType.value = props.data.respondentType;
|
|
||||||
formData.oc = props.data.resultOc;
|
|
||||||
formData.disciplineType = props.data.resultDisciplineType;
|
|
||||||
formData.titleType = props.data.resultTitleType;
|
|
||||||
formData.disciplineDisciplinary_DocResults =
|
|
||||||
props.data.disciplineDisciplinary_DocResults;
|
|
||||||
formData.year = props.data.resultYear ?? 0;
|
|
||||||
mainStore.rowsAdd = props.data.persons;
|
|
||||||
await fetchDatadetail();
|
|
||||||
await getActive();
|
|
||||||
|
|
||||||
organizationId.value = props.data.organizationId;
|
|
||||||
organizationName.value = props.data.organization;
|
|
||||||
organization.value = {
|
|
||||||
id: props.data.organizationId,
|
|
||||||
name: props.data.organization,
|
|
||||||
};
|
|
||||||
} else if (countNum.value === 2) {
|
|
||||||
formData.disciplineDisciplinary_DocResults =
|
|
||||||
props.data.disciplineDisciplinary_DocResults;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
function inputEdit(val: boolean) {
|
function inputEdit(val: boolean) {
|
||||||
return {
|
return {
|
||||||
|
|
@ -221,10 +189,7 @@ function uploadFile() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function downloadFile(link: string) {
|
/** ลบไฟล์ */
|
||||||
window.open(link, "_blank");
|
|
||||||
}
|
|
||||||
|
|
||||||
function deleteFile(id: string) {
|
function deleteFile(id: string) {
|
||||||
dialogRemove($q, () => confirmDelete(id));
|
dialogRemove($q, () => confirmDelete(id));
|
||||||
}
|
}
|
||||||
|
|
@ -248,16 +213,19 @@ function confirmDelete(docid: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** เปิดรายละเอียด */
|
||||||
function openDetial(id: string) {
|
function openDetial(id: string) {
|
||||||
personalId.value = id;
|
personalId.value = id;
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** xbf ikp]tgvupf */
|
||||||
function closeDetail() {
|
function closeDetail() {
|
||||||
modalHistory.value = false;
|
modalHistory.value = false;
|
||||||
personalId.value = "";
|
personalId.value = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** เปิดรายละเอียด */
|
||||||
function onclickViewinfo(id: string) {
|
function onclickViewinfo(id: string) {
|
||||||
modalPersonal.value = true;
|
modalPersonal.value = true;
|
||||||
personId.value = id;
|
personId.value = id;
|
||||||
|
|
@ -266,6 +234,39 @@ function onclickViewinfo(id: string) {
|
||||||
function updatemodalPersonal(modal: boolean) {
|
function updatemodalPersonal(modal: boolean) {
|
||||||
modalPersonal.value = modal;
|
modalPersonal.value = modal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* เช็คข้อมูลจาก props
|
||||||
|
* เมื่อมีข้อมูล
|
||||||
|
* เก็บข้อมูลลง formData
|
||||||
|
*/
|
||||||
|
watch(
|
||||||
|
() => props.data,
|
||||||
|
async () => {
|
||||||
|
if (countNum.value === 1) {
|
||||||
|
respondentType.value = props.data.respondentType;
|
||||||
|
formData.oc = props.data.resultOc;
|
||||||
|
formData.disciplineType = props.data.resultDisciplineType;
|
||||||
|
formData.titleType = props.data.resultTitleType;
|
||||||
|
formData.disciplineDisciplinary_DocResults =
|
||||||
|
props.data.disciplineDisciplinary_DocResults;
|
||||||
|
formData.year = props.data.resultYear ?? 0;
|
||||||
|
mainStore.rowsAdd = props.data.persons;
|
||||||
|
await fetchDatadetail();
|
||||||
|
await getActive();
|
||||||
|
|
||||||
|
organizationId.value = props.data.organizationId;
|
||||||
|
organizationName.value = props.data.organization;
|
||||||
|
organization.value = {
|
||||||
|
id: props.data.organizationId,
|
||||||
|
name: props.data.organization,
|
||||||
|
};
|
||||||
|
} else if (countNum.value === 2) {
|
||||||
|
formData.disciplineDisciplinary_DocResults =
|
||||||
|
props.data.disciplineDisciplinary_DocResults;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="row col-12 bg-white">
|
<div class="row col-12 bg-white">
|
||||||
|
|
|
||||||
|
|
@ -2,17 +2,18 @@
|
||||||
import { onMounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
import Table from "@/modules/11_discipline/components/4_Result/Table.vue";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
||||||
|
|
||||||
import type { Pagination } from "@/modules/03_recruiting/interface/index/Main";
|
import type { Pagination } from "@/modules/03_recruiting/interface/index/Main";
|
||||||
|
|
||||||
|
import Table from "@/modules/11_discipline/components/4_Result/Table.vue";
|
||||||
|
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const store = useDisciplineResultStore();
|
const store = useDisciplineResultStore();
|
||||||
const { showLoader, hideLoader, messageError } = mixin;
|
const { showLoader, hideLoader, messageError } = mixin;
|
||||||
|
|
@ -28,6 +29,7 @@ const maxPage = ref<number>(1);
|
||||||
const totalList = ref<number>(0);
|
const totalList = ref<number>(0);
|
||||||
const filter = ref<string>("");
|
const filter = ref<string>("");
|
||||||
const status = ref<string>("DONE");
|
const status = ref<string>("DONE");
|
||||||
|
|
||||||
/** function เรียกรายการสรุปผลการพิจารณาทางวินัย*/
|
/** function เรียกรายการสรุปผลการพิจารณาทางวินัย*/
|
||||||
async function fetchListResult() {
|
async function fetchListResult() {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,13 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, useAttrs, watch } from "vue";
|
import { ref, useAttrs, watch } from "vue";
|
||||||
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
|
||||||
|
|
||||||
|
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
|
|
||||||
const store = useDisciplineResultStore();
|
const store = useDisciplineResultStore();
|
||||||
const table = ref<any>(null);
|
const table = ref<any>(null);
|
||||||
const filterRef = ref<any>(null);
|
const filterRef = ref<any>(null);
|
||||||
const attrs = ref<any>(useAttrs());
|
const attrs = ref<any>(useAttrs());
|
||||||
const paging = ref<boolean>(true);
|
|
||||||
const statusFilter = ref<string>("DONE");
|
const statusFilter = ref<string>("DONE");
|
||||||
|
|
||||||
const option = ref<any[]>(store.statusOptions);
|
const option = ref<any[]>(store.statusOptions);
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { VuePDF, usePDF } from "@tato30/vue-pdf";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useQuasar } from "quasar";
|
import { VuePDF, usePDF } from "@tato30/vue-pdf";
|
||||||
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useReportDataStore } from "@/modules/11_discipline/store/ReportStore";
|
import { useReportDataStore } from "@/modules/11_discipline/store/ReportStore";
|
||||||
|
|
||||||
|
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
||||||
|
|
||||||
const date = ref<Date>();
|
const date = ref<Date>();
|
||||||
const dateEnd = ref<Date>();
|
const dateEnd = ref<Date>();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
@ -17,7 +18,6 @@ const mixin = useCounterMixin();
|
||||||
const { date2Thai } = mixin;
|
const { date2Thai } = mixin;
|
||||||
const { filterFnOptionsType } = store;
|
const { filterFnOptionsType } = store;
|
||||||
|
|
||||||
const $q = useQuasar();
|
|
||||||
const ocSelect = ref<string>("");
|
const ocSelect = ref<string>("");
|
||||||
const government = ref<string>("");
|
const government = ref<string>("");
|
||||||
const fault = ref<string>();
|
const fault = ref<string>();
|
||||||
|
|
@ -32,16 +32,6 @@ function backHistory() {
|
||||||
window.history.back();
|
window.history.back();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** แสดงรายงาน */
|
|
||||||
function showDocument(url: any) {
|
|
||||||
const pdfData = usePDF(url);
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
pdfSrc.value = pdfData.pdf.value;
|
|
||||||
numOfPages.value = pdfData.pages.value;
|
|
||||||
}, 1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ไปหน้าต่อไปของรายงาน */
|
/** ไปหน้าต่อไปของรายงาน */
|
||||||
function nextPage() {
|
function nextPage() {
|
||||||
if (page.value < numOfPages.value) {
|
if (page.value < numOfPages.value) {
|
||||||
|
|
|
||||||
|
|
@ -1,27 +1,30 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, useAttrs, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import router from "@/router";
|
import router from "@/router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
import { useDisciplineChannelDataStore } from "@/modules/11_discipline/store/ChannelStore";
|
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
import { useDisciplineChannelDataStore } from "@/modules/11_discipline/store/ChannelStore";
|
||||||
|
|
||||||
import type { typeItem } from "@/modules/11_discipline/interface/response/channel";
|
import type { typeItem } from "@/modules/11_discipline/interface/response/channel";
|
||||||
|
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
import Header from "@/components/DialogHeader.vue";
|
import Header from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
|
const $q = useQuasar(); //ใช้ noti quasar
|
||||||
|
const dataStore = useDisciplineChannelDataStore();
|
||||||
|
const mixin = useCounterMixin();
|
||||||
|
const { dialogRemove, showLoader, messageError, hideLoader, success } = mixin;
|
||||||
|
|
||||||
const modal = ref<boolean>(false);
|
const modal = ref<boolean>(false);
|
||||||
const isEdit = ref<boolean>(false);
|
const isEdit = ref<boolean>(false);
|
||||||
const isRead = ref<boolean>(false);
|
const isRead = ref<boolean>(false);
|
||||||
const isId = ref<string>("");
|
const isId = ref<string>("");
|
||||||
const channel = ref<string>("");
|
const channel = ref<string>("");
|
||||||
|
|
||||||
const dataStore = useDisciplineChannelDataStore();
|
|
||||||
const mixin = useCounterMixin();
|
|
||||||
const { dialogRemove, showLoader, messageError, hideLoader, success } = mixin;
|
|
||||||
const $q = useQuasar(); //ใช้ noti quasar
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ค้นหาในตาราง
|
* ค้นหาในตาราง
|
||||||
*/
|
*/
|
||||||
|
|
@ -38,7 +41,6 @@ const resetFilter = () => {
|
||||||
*pagination ของตาราง
|
*pagination ของตาราง
|
||||||
*/
|
*/
|
||||||
const pagination = ref({
|
const pagination = ref({
|
||||||
// sortBy: "desc",
|
|
||||||
descending: false,
|
descending: false,
|
||||||
page: 1,
|
page: 1,
|
||||||
rowsPerPage: 10,
|
rowsPerPage: 10,
|
||||||
|
|
@ -114,15 +116,7 @@ async function deleteData(id: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** ปิด popup */
|
||||||
* ไปหน้า แก้ไข
|
|
||||||
* @param id type
|
|
||||||
*/
|
|
||||||
function editPage(data: typeItem) {
|
|
||||||
dataStore.getType(data.name);
|
|
||||||
router.push(`/discipline/channel/${data.id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
function closeDialog() {
|
function closeDialog() {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
channel.value = "";
|
channel.value = "";
|
||||||
|
|
@ -130,6 +124,7 @@ function closeDialog() {
|
||||||
isRead.value = false;
|
isRead.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** class input */
|
||||||
function inputEdit(val: boolean) {
|
function inputEdit(val: boolean) {
|
||||||
return {
|
return {
|
||||||
"full-width cursor-pointer ": val,
|
"full-width cursor-pointer ": val,
|
||||||
|
|
@ -137,6 +132,7 @@ function inputEdit(val: boolean) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** บันทึกช่องทางการร้องเรียน */
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
const url = isEdit.value
|
const url = isEdit.value
|
||||||
? config.API.complaintChannelbyId(isId.value)
|
? config.API.complaintChannelbyId(isId.value)
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,12 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Form from "@/modules/11_discipline/components/6_BasicInformation/Director/Form.vue";
|
import Form from "@/modules/11_discipline/components/6_BasicInformation/Director/Form.vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useRouter } from "vue-router";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useQuasar } from "quasar";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
import type { FormDataPost } from "@/modules/11_discipline/interface/request/director";
|
import type { FormDataPost } from "@/modules/11_discipline/interface/request/director";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,20 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, watch, onMounted } from "vue";
|
import { ref, reactive, watch } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import type { FormData } from "@/modules/11_discipline/interface/request/director";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
import type { FormData } from "@/modules/11_discipline/interface/request/director";
|
||||||
|
|
||||||
import Header from "@/components/DialogHeader.vue";
|
import Header from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm, success, showLoader, hideLoader, messageError } = mixin;
|
const { success, showLoader, hideLoader, messageError } = mixin;
|
||||||
const isReadonly = ref<boolean>(false);
|
|
||||||
|
|
||||||
|
const isReadonly = ref<boolean>(false);
|
||||||
const modal = defineModel<boolean>("modal", { required: true });
|
const modal = defineModel<boolean>("modal", { required: true });
|
||||||
const personalId = defineModel<string>("personalId", { required: true });
|
const personalId = defineModel<string>("personalId", { required: true });
|
||||||
const isEdit = defineModel<boolean>("isEdit", { required: true });
|
const isEdit = defineModel<boolean>("isEdit", { required: true });
|
||||||
|
|
@ -21,6 +22,7 @@ const isEdit = defineModel<boolean>("isEdit", { required: true });
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
getList: Function,
|
getList: Function,
|
||||||
});
|
});
|
||||||
|
|
||||||
const data = reactive<FormData>({
|
const data = reactive<FormData>({
|
||||||
personalId: "",
|
personalId: "",
|
||||||
prefix: "",
|
prefix: "",
|
||||||
|
|
@ -39,6 +41,7 @@ function inputEdit(val: boolean) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** ปิด popup เเละ clear */
|
||||||
function closeDialog() {
|
function closeDialog() {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
personalId.value = "";
|
personalId.value = "";
|
||||||
|
|
@ -52,6 +55,7 @@ function closeDialog() {
|
||||||
data.qualification = "";
|
data.qualification = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** บันทึก กรรมการ */
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,14 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {
|
import { ref, watch } from "vue";
|
||||||
ref,
|
|
||||||
computed,
|
|
||||||
watchEffect,
|
|
||||||
watch,
|
|
||||||
type PropType,
|
|
||||||
onMounted,
|
|
||||||
} from "vue";
|
|
||||||
import { QForm, useQuasar } from "quasar";
|
import { QForm, useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import type { DirectorRowsResponse } from "@/modules/11_discipline/interface/response/director";
|
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
import type { DirectorRowsResponse } from "@/modules/11_discipline/interface/response/director";
|
||||||
|
|
||||||
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,20 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, reactive } from "vue";
|
import { ref, onMounted, reactive } from "vue";
|
||||||
import Form from "@/modules/11_discipline/components/6_BasicInformation/Director/Form.vue";
|
|
||||||
import type { FormData } from "@/modules/11_discipline/interface/request/director";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import router from "@/router";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
import router from "@/router";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
import type { FormData } from "@/modules/11_discipline/interface/request/director";
|
||||||
|
|
||||||
|
import Form from "@/modules/11_discipline/components/6_BasicInformation/Director/Form.vue";
|
||||||
|
|
||||||
|
const $q = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const personalId = ref<string>(route.params.id.toString());
|
const personalId = ref<string>(route.params.id.toString());
|
||||||
const $q = useQuasar();
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { messageError, showLoader, hideLoader, dialogConfirm, success } = mixin;
|
const { messageError, showLoader, hideLoader, dialogConfirm, success } = mixin;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,12 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, watch } from "vue";
|
import { ref, reactive, watch } from "vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
FormData,
|
FormData,
|
||||||
FormRef,
|
FormRef,
|
||||||
|
|
@ -10,8 +14,6 @@ import type {
|
||||||
ResponsePreson,
|
ResponsePreson,
|
||||||
tableType,
|
tableType,
|
||||||
} from "@/modules/11_discipline/interface/request/director";
|
} from "@/modules/11_discipline/interface/request/director";
|
||||||
import http from "@/plugins/http";
|
|
||||||
import config from "@/app.config";
|
|
||||||
|
|
||||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||||
|
|
||||||
|
|
@ -142,12 +144,8 @@ const columnsRespondent = ref<QTableProps["columns"]>([
|
||||||
const visibleColumnsRespondent = ref<string[]>([
|
const visibleColumnsRespondent = ref<string[]>([
|
||||||
"info",
|
"info",
|
||||||
"no",
|
"no",
|
||||||
// "idcard",
|
|
||||||
"name",
|
"name",
|
||||||
// "posNo",
|
|
||||||
"position",
|
"position",
|
||||||
// "positionLevel",
|
|
||||||
// "salary",
|
|
||||||
"organization",
|
"organization",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
@ -168,6 +166,7 @@ function onValidate() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** class input */
|
||||||
function inputEdit(val: boolean) {
|
function inputEdit(val: boolean) {
|
||||||
return {
|
return {
|
||||||
"full-width cursor-pointer ": val,
|
"full-width cursor-pointer ": val,
|
||||||
|
|
@ -180,6 +179,7 @@ function updateSelect() {
|
||||||
search.value = "";
|
search.value = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** ค้าหาข้อมูล */
|
||||||
async function searchInput() {
|
async function searchInput() {
|
||||||
searchRef.value.validate();
|
searchRef.value.validate();
|
||||||
if (!searchRef.value.hasError) {
|
if (!searchRef.value.hasError) {
|
||||||
|
|
@ -187,6 +187,7 @@ async function searchInput() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** ดึงข้อมูล */
|
||||||
async function getSearch() {
|
async function getSearch() {
|
||||||
showLoader();
|
showLoader();
|
||||||
const body = {
|
const body = {
|
||||||
|
|
@ -233,6 +234,7 @@ async function getSearch() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** เก็บข้อมูลลงตัวแปร */
|
||||||
function returnDetail(data: ResponsePreson) {
|
function returnDetail(data: ResponsePreson) {
|
||||||
formData.prefix = data.prefix;
|
formData.prefix = data.prefix;
|
||||||
formData.firstname = data.firstName;
|
formData.firstname = data.firstName;
|
||||||
|
|
@ -392,10 +394,6 @@ watch(
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'info'">
|
<div v-else-if="col.name == 'info'">
|
||||||
<!-- <router-link
|
|
||||||
target="_blank"
|
|
||||||
:to="`/registry/${props.row.personId}`"
|
|
||||||
> -->
|
|
||||||
<q-btn
|
<q-btn
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
|
|
@ -417,7 +415,6 @@ watch(
|
||||||
</d-table>
|
</d-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="col-12"><q-separator /></div> -->
|
|
||||||
|
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<q-input
|
<q-input
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,16 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, useAttrs, onMounted, watch } from "vue";
|
import { ref, onMounted, watch } from "vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useDisciplineDirectorDataStore } from "@/modules/11_discipline/store/DirectorStore";
|
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import DialogTotal from "@/modules/11_discipline/components/6_BasicInformation/Director/DialogInvestigateTotal.vue";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useDisciplineDirectorDataStore } from "@/modules/11_discipline/store/DirectorStore";
|
||||||
|
|
||||||
import type { DirectorRowsResponse } from "@/modules/11_discipline/interface/response/director";
|
import type { DirectorRowsResponse } from "@/modules/11_discipline/interface/response/director";
|
||||||
|
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import DialogTotal from "@/modules/11_discipline/components/6_BasicInformation/Director/DialogInvestigateTotal.vue";
|
||||||
import DialogEdit from "@/modules/11_discipline/components/6_BasicInformation/Director/DialogEdit.vue";
|
import DialogEdit from "@/modules/11_discipline/components/6_BasicInformation/Director/DialogEdit.vue";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
@ -44,22 +46,6 @@ const pagination = ref({
|
||||||
rowsPerPage: rowsPerPage.value,
|
rowsPerPage: rowsPerPage.value,
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(
|
|
||||||
() => currentPage.value,
|
|
||||||
() => {
|
|
||||||
rowsPerPage.value = pagination.value.rowsPerPage;
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => pagination.value.rowsPerPage,
|
|
||||||
() => {
|
|
||||||
rowsPerPage.value = pagination.value.rowsPerPage;
|
|
||||||
currentPage.value = 1;
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
async function getList() {
|
async function getList() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
|
|
@ -144,6 +130,23 @@ function onEdit(id: string, check: boolean) {
|
||||||
isEdit.value = check;
|
isEdit.value = check;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => currentPage.value,
|
||||||
|
() => {
|
||||||
|
rowsPerPage.value = pagination.value.rowsPerPage;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => pagination.value.rowsPerPage,
|
||||||
|
() => {
|
||||||
|
rowsPerPage.value = pagination.value.rowsPerPage;
|
||||||
|
currentPage.value = 1;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
/**เมื่อเริ่มโหลดหน้า
|
/**เมื่อเริ่มโหลดหน้า
|
||||||
* ส่งข้อมูลจำลองไปยัง store
|
* ส่งข้อมูลจำลองไปยัง store
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,10 @@
|
||||||
import { onMounted, ref, reactive } from "vue";
|
import { onMounted, ref, reactive } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { tokenParsed } from "@/plugins/auth";
|
import { tokenParsed } from "@/plugins/auth";
|
||||||
import { useDisciplineSuspendStore } from "@/modules/11_discipline/store/SuspendStore";
|
import { useDisciplineSuspendStore } from "@/modules/11_discipline/store/SuspendStore";
|
||||||
|
|
||||||
|
|
@ -168,28 +169,6 @@ async function clickCancel() {
|
||||||
edit.value = false;
|
edit.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ฟังก์ชั่น Save
|
|
||||||
*/
|
|
||||||
// async function conditionSave() {
|
|
||||||
// if (myForm.value !== null) {
|
|
||||||
// myForm.value.validate().then((success) => {
|
|
||||||
// if (success) {
|
|
||||||
// dialogMessage(
|
|
||||||
// $q,
|
|
||||||
// "ต้องการแก้ไขข้อมูลหรือไม่?",
|
|
||||||
// "แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย",
|
|
||||||
// "mdi-help-circle-outline",
|
|
||||||
// "ตกลง",
|
|
||||||
// "public",
|
|
||||||
// async () => await saveData(),
|
|
||||||
// undefined
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชั่น Saveจาก API
|
* ฟังก์ชั่น Saveจาก API
|
||||||
*/
|
*/
|
||||||
|
|
@ -274,60 +253,6 @@ onMounted(async () => {
|
||||||
รายละเอียดการของ {{ data.name }}
|
รายละเอียดการของ {{ data.name }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <q-card bordered class="row col-12 text-dark">
|
|
||||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
|
||||||
<div class="q-pl-sm text-weight-bold text-subtitle2">
|
|
||||||
{{ data.name }}
|
|
||||||
</div>
|
|
||||||
<q-space />
|
|
||||||
<q-btn
|
|
||||||
outline
|
|
||||||
color="blue"
|
|
||||||
dense
|
|
||||||
icon-right="mdi-open-in-new"
|
|
||||||
class="q-px-sm"
|
|
||||||
label="ดูข้อมูลทะเบียนประวัติ"
|
|
||||||
@click="onclickViewinfo(data.personId)"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col-12"><q-separator /></div>
|
|
||||||
<div class="row col-12 q-pa-md">
|
|
||||||
<div class="col-12 row bg-white q-col-gutter-md">
|
|
||||||
<div class="col-xs-3 col-sm-2 col-md-1 row">
|
|
||||||
<q-img
|
|
||||||
:src="data.avatar"
|
|
||||||
v-if="data.avatar !== '' && data.avatar !== null"
|
|
||||||
/>
|
|
||||||
<q-img src="@/assets/avatar_user.jpg" v-else />
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-6 col-sm-3 row items-center">
|
|
||||||
<div class="col-12 q-pl-md">
|
|
||||||
<div class="col-12 text-top">ตำแหน่งในสายงาน</div>
|
|
||||||
<div class="col-12 text-detail">
|
|
||||||
{{ data.position }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-6 col-sm-3 row items-center">
|
|
||||||
<div class="col-12">
|
|
||||||
<div class="col-12 text-top">ระดับ</div>
|
|
||||||
<div class="col-12 text-detail">
|
|
||||||
{{ data.positionLevel }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-6 col-sm-3 row items-center">
|
|
||||||
<div class="col-12">
|
|
||||||
<div class="col-12 text-top">สังกัด</div>
|
|
||||||
<div class="col-12 text-detail">
|
|
||||||
{{ data.organization }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</q-card> -->
|
|
||||||
|
|
||||||
<CardProfile :data="dataProfile as DataProfile" />
|
<CardProfile :data="dataProfile as DataProfile" />
|
||||||
|
|
||||||
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,15 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, watch, onMounted } from "vue";
|
import { ref, computed, onMounted } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
|
||||||
|
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type { OpType } from "@/modules/05_placement/interface/response/Main";
|
import type { OpType } from "@/modules/05_placement/interface/response/Main";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
import config from "@/app.config";
|
|
||||||
|
|
||||||
/** use */
|
/** use */
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
@ -16,7 +17,6 @@ const selected = ref<any>([]);
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const {
|
const {
|
||||||
showLoader,
|
showLoader,
|
||||||
success,
|
|
||||||
messageError,
|
messageError,
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
hideLoader,
|
hideLoader,
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,14 @@
|
||||||
import { ref, onMounted, watch } from "vue";
|
import { ref, onMounted, watch } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { useDisciplineSuspendStore } from "@/modules/11_discipline/store/SuspendStore";
|
|
||||||
import type { dataType } from "@/modules/11_discipline/interface/response/suspend";
|
|
||||||
import type { QTableProps } from "quasar";
|
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useDisciplineSuspendStore } from "@/modules/11_discipline/store/SuspendStore";
|
||||||
|
|
||||||
|
import type { dataType } from "@/modules/11_discipline/interface/response/suspend";
|
||||||
|
import type { QTableProps } from "quasar";
|
||||||
|
|
||||||
import DialogSendToCommand from "@/modules/11_discipline/components/7_ListSuspend/DialogSendToCommand.vue";
|
import DialogSendToCommand from "@/modules/11_discipline/components/7_ListSuspend/DialogSendToCommand.vue";
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
|
|
@ -18,7 +19,6 @@ const dataStore = useDisciplineSuspendStore();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
||||||
const { messageError, showLoader, hideLoader, success } = mixin;
|
const { messageError, showLoader, hideLoader, success } = mixin;
|
||||||
|
|
||||||
const modal = ref<boolean>(false);
|
const modal = ref<boolean>(false);
|
||||||
|
|
@ -126,13 +126,6 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
const openModal = () => (modal.value = true);
|
const openModal = () => (modal.value = true);
|
||||||
const closeModal = () => (modal.value = false);
|
const closeModal = () => (modal.value = false);
|
||||||
|
|
||||||
function resetFilter() {
|
|
||||||
filterKeyword.value = "";
|
|
||||||
filterKeyword2.value = "";
|
|
||||||
filterRef.value.focus();
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
|
|
||||||
const currentPage = ref<number>(1);
|
const currentPage = ref<number>(1);
|
||||||
const maxPage = ref<number>(1);
|
const maxPage = ref<number>(1);
|
||||||
const page = ref<number>(1);
|
const page = ref<number>(1);
|
||||||
|
|
@ -149,6 +142,13 @@ const pagination = ref({
|
||||||
rowsPerPage: rowsPerPage.value,
|
rowsPerPage: rowsPerPage.value,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function resetFilter() {
|
||||||
|
filterKeyword.value = "";
|
||||||
|
filterKeyword2.value = "";
|
||||||
|
filterRef.value.focus();
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
|
||||||
/** เปิด popup ส่งไปออกคำสั่ง โดย PENDING*/
|
/** เปิด popup ส่งไปออกคำสั่ง โดย PENDING*/
|
||||||
function openModalOrder() {
|
function openModalOrder() {
|
||||||
openModal();
|
openModal();
|
||||||
|
|
@ -213,6 +213,10 @@ function onSubmit(data: dataType[], type: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function filterFn() {
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => currentPage.value,
|
() => currentPage.value,
|
||||||
() => {
|
() => {
|
||||||
|
|
@ -230,10 +234,6 @@ watch(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
function filterFn() {
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** เรียกใช้งานเมื่อเริ่มหน้าเว็ป */
|
/** เรียกใช้งานเมื่อเริ่มหน้าเว็ป */
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Form from "@/modules/11_discipline/components/8_AppealComplain/Form.vue";
|
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
|
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
import Form from "@/modules/11_discipline/components/8_AppealComplain/Form.vue";
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
||||||
const { showLoader, messageError, hideLoader, dialogConfirm, success } = mixin;
|
const { showLoader, messageError, hideLoader, dialogConfirm, success } = mixin;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,10 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, reactive } from "vue";
|
import { ref, onMounted, reactive } from "vue";
|
||||||
import Form from "@/modules/11_discipline/components/8_AppealComplain/Form.vue";
|
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
|
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
|
|
@ -9,15 +12,15 @@ import type {
|
||||||
HistoryStatusType,
|
HistoryStatusType,
|
||||||
FileObType,
|
FileObType,
|
||||||
} from "@/modules/11_discipline/interface/response/appealComplain";
|
} from "@/modules/11_discipline/interface/response/appealComplain";
|
||||||
import config from "@/app.config";
|
|
||||||
import http from "@/plugins/http";
|
import Form from "@/modules/11_discipline/components/8_AppealComplain/Form.vue";
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
||||||
const { showLoader, messageError, hideLoader, dialogConfirm, success } = mixin;
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const { showLoader, messageError, hideLoader, success } = mixin;
|
||||||
|
|
||||||
const id = ref<string>(route.params.id as string);
|
const id = ref<string>(route.params.id as string);
|
||||||
const checkRoutePermission = ref<boolean>(route.name == "appealComplainDetail");
|
const checkRoutePermission = ref<boolean>(route.name == "appealComplainDetail");
|
||||||
const historyStatusOb = reactive<HistoryStatusType>({
|
const historyStatusOb = reactive<HistoryStatusType>({
|
||||||
|
|
|
||||||
|
|
@ -3,21 +3,21 @@ import { ref, reactive, watch, onMounted } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
|
||||||
|
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useAppealComplainStore } from "@/modules/11_discipline/store/AppealComplainStore";
|
import { useAppealComplainStore } from "@/modules/11_discipline/store/AppealComplainStore";
|
||||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||||
import DialogHistory from "@/modules/11_discipline/components/8_AppealComplain/dialog/DialogEditStatus.vue";
|
|
||||||
|
|
||||||
import config from "@/app.config";
|
|
||||||
import http from "@/plugins/http";
|
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
MyObjectAppealRef,
|
MyObjectAppealRef,
|
||||||
HistoryStatusType,
|
HistoryStatusType,
|
||||||
} from "@/modules/11_discipline/interface/response/appealComplain";
|
} from "@/modules/11_discipline/interface/response/appealComplain";
|
||||||
import { checkPermission } from "@/utils/permissions";
|
|
||||||
|
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
||||||
|
import DialogHistory from "@/modules/11_discipline/components/8_AppealComplain/dialog/DialogEditStatus.vue";
|
||||||
|
|
||||||
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
||||||
const mainStore = useDisciplineMainStore();
|
const mainStore = useDisciplineMainStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,25 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, watch, reactive } from "vue";
|
import { ref, onMounted, watch, reactive } from "vue";
|
||||||
|
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useAppealComplainStore } from "@/modules/11_discipline/store/AppealComplainStore";
|
||||||
|
import { checkPermission } from "@/utils/permissions";
|
||||||
|
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type { RowList } from "@/modules/11_discipline/interface/response/appealComplain";
|
import type { RowList } from "@/modules/11_discipline/interface/response/appealComplain";
|
||||||
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
||||||
// importStroe
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { useAppealComplainStore } from "@/modules/11_discipline/store/AppealComplainStore";
|
|
||||||
|
|
||||||
// impoet Components
|
|
||||||
import DialogStatus from "@/modules/11_discipline/components/8_AppealComplain/dialog/DialogEditStatus.vue";
|
import DialogStatus from "@/modules/11_discipline/components/8_AppealComplain/dialog/DialogEditStatus.vue";
|
||||||
import config from "@/app.config";
|
|
||||||
import http from "@/plugins/http";
|
|
||||||
|
|
||||||
import { checkPermission } from "@/utils/permissions";
|
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
|
||||||
|
|
||||||
const { showLoader, messageError, hideLoader, dialogConfirm } = mixin;
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const mixin = useCounterMixin();
|
||||||
|
const { showLoader, messageError, hideLoader, dialogConfirm } = mixin;
|
||||||
|
|
||||||
const modalStatusEdit = ref<boolean>(false);
|
const modalStatusEdit = ref<boolean>(false);
|
||||||
/** stoer */
|
/** stoer */
|
||||||
const dataStore = useAppealComplainStore();
|
const dataStore = useAppealComplainStore();
|
||||||
|
|
@ -29,9 +28,8 @@ const type = ref<DataOption[]>([
|
||||||
{ id: "ALL", name: "ทั้งหมด" },
|
{ id: "ALL", name: "ทั้งหมด" },
|
||||||
...dataStore.typeOptions,
|
...dataStore.typeOptions,
|
||||||
]);
|
]);
|
||||||
const filterTable = ref<string>("");
|
|
||||||
const filterKeyword = ref<string>("");
|
|
||||||
|
|
||||||
|
const filterKeyword = ref<string>("");
|
||||||
const dataRow = ref<RowList[]>([]);
|
const dataRow = ref<RowList[]>([]);
|
||||||
const currentPage = ref<number>(1);
|
const currentPage = ref<number>(1);
|
||||||
const maxPage = ref<number>(1);
|
const maxPage = ref<number>(1);
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,19 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch, reactive } from "vue";
|
import { ref, watch, reactive } from "vue";
|
||||||
|
|
||||||
import { useAppealComplainStore } from "@/modules/11_discipline/store/AppealComplainStore";
|
import { useAppealComplainStore } from "@/modules/11_discipline/store/AppealComplainStore";
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
|
|
||||||
import type { HistoryStatusType } from "@/modules/11_discipline/interface/response/appealComplain";
|
import type { HistoryStatusType } from "@/modules/11_discipline/interface/response/appealComplain";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
const $q = useQuasar();
|
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm, date2Thai } = mixin;
|
const { date2Thai } = mixin;
|
||||||
const dataStore = useAppealComplainStore();
|
const dataStore = useAppealComplainStore();
|
||||||
|
|
||||||
const rows = ref<HistoryStatusType[]>([]);
|
const rows = ref<HistoryStatusType[]>([]);
|
||||||
|
|
||||||
/** หัวข้อที่เเสดงในตารางผู้ถูกร้องเรียน */
|
/** หัวข้อที่เเสดงในตารางผู้ถูกร้องเรียน */
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
"no",
|
"no",
|
||||||
|
|
@ -22,6 +21,7 @@ const visibleColumns = ref<string[]>([
|
||||||
"createdFullName",
|
"createdFullName",
|
||||||
"createdAt",
|
"createdAt",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/** หัวตารางผู้ถูกร้องเรียน */
|
/** หัวตารางผู้ถูกร้องเรียน */
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
|
|
@ -61,6 +61,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modal: {
|
modal: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,22 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, reactive, ref, useAttrs } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import router from "@/router";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
import type { QTableProps } from "quasar";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
import router from "@/router";
|
||||||
import type { QTableProps } from "quasar";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
import type { FormOrderPlacementMainData } from "@/modules/10_order/interface/request/Main";
|
import { useOrderPlacementDataStore } from "@/modules/10_order/store";
|
||||||
import type {
|
|
||||||
DataOption,
|
|
||||||
DataOption1,
|
|
||||||
} from "@/modules/10_order/interface/index/Main";
|
|
||||||
|
|
||||||
import PopupHistory from "@/modules/10_order/components/PopupHistory.vue";
|
|
||||||
import TableOrder from "@/modules/11_discipline/components/9_Order/TableOrder.vue";
|
|
||||||
|
|
||||||
import { useOrderStore } from "@/modules/11_discipline/store/OrderStore";
|
import { useOrderStore } from "@/modules/11_discipline/store/OrderStore";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useOrderPlacementDataStore } from "@/modules/10_order/store";
|
import type { DataOption1 } from "@/modules/10_order/interface/index/Main";
|
||||||
|
import PopupHistory from "@/modules/10_order/components/PopupHistory.vue";
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import TableOrder from "@/modules/11_discipline/components/9_Order/TableOrder.vue";
|
||||||
|
|
||||||
const $q = useQuasar(); //ใช้ noti quasar
|
const $q = useQuasar(); //ใช้ noti quasar
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const DataStore = useOrderPlacementDataStore();
|
|
||||||
const stroe = useOrderStore();
|
const stroe = useOrderStore();
|
||||||
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
|
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
|
||||||
|
|
||||||
|
|
@ -41,116 +33,11 @@ const commandCodes = ref<string[]>([
|
||||||
"C-PM-32",
|
"C-PM-32",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// คอลัมน์ของตาราง
|
|
||||||
const columns = ref<QTableProps["columns"]>([
|
|
||||||
{
|
|
||||||
name: "Order",
|
|
||||||
align: "left",
|
|
||||||
label: "คำสั่ง",
|
|
||||||
sortable: true,
|
|
||||||
field: "Order",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "OrderNum",
|
|
||||||
align: "left",
|
|
||||||
label: "เลขที่คำสั่ง",
|
|
||||||
sortable: true,
|
|
||||||
field: "OrderNum",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "OrderType",
|
|
||||||
align: "left",
|
|
||||||
label: "ประเภท",
|
|
||||||
sortable: false,
|
|
||||||
field: "OrderType",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "OrderDate",
|
|
||||||
align: "left",
|
|
||||||
label: "สั่ง ณ วันที่/วันที่คำสั่งมีผล",
|
|
||||||
sortable: true,
|
|
||||||
field: "OrderDate",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a, b) => parseInt(a) - parseInt(b),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "OrderBy",
|
|
||||||
align: "left",
|
|
||||||
label: "คำสั่งโดย",
|
|
||||||
sortable: true,
|
|
||||||
field: "OrderBy",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Signer",
|
|
||||||
align: "left",
|
|
||||||
label: "ผู้ลงนาม",
|
|
||||||
sortable: true,
|
|
||||||
field: "Signer",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "OrderStatus",
|
|
||||||
align: "center",
|
|
||||||
label: "สถานะคำสั่ง",
|
|
||||||
sortable: true,
|
|
||||||
field: "OrderStatus",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
async function fetchOrderlist() {
|
|
||||||
showLoader();
|
|
||||||
await http
|
|
||||||
.get(config.API.listOrder())
|
|
||||||
.then((res: any) => {
|
|
||||||
const data = res.data.result;
|
|
||||||
const typeid = OrderTypeOption.value.map((e) => e.id);
|
|
||||||
|
|
||||||
const filterListOrder = data.filter((e: any) =>
|
|
||||||
typeid.includes(e.orderTypeValue)
|
|
||||||
);
|
|
||||||
|
|
||||||
stroe.fetchOrder(filterListOrder);
|
|
||||||
})
|
|
||||||
.catch((e: any) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(async () => {
|
|
||||||
hideLoader();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// สร้างคำสั่งใหม่
|
|
||||||
const clickAdd = () => {
|
|
||||||
router.push({ name: "disciplineOrderAdd" });
|
|
||||||
};
|
|
||||||
|
|
||||||
// รายการข้อมูลปีงบประมาณ
|
// รายการข้อมูลปีงบประมาณ
|
||||||
const fiscalyear = ref<number | null>(0);
|
const fiscalyear = ref<number | null>(0);
|
||||||
const fiscalyearOP = ref<any>([{ id: 0, name: "ทั้งหมด" }]);
|
const fiscalyearOP = ref<any>([{ id: 0, name: "ทั้งหมด" }]);
|
||||||
const fiscalyearFilter1 = ref<any>([]);
|
const fiscalyearFilter1 = ref<any>([]);
|
||||||
const fiscalYearFilter = async () => {
|
async function fiscalYearFilter() {
|
||||||
await http.get(config.API.yearOptionsOrder()).then((res) => {
|
await http.get(config.API.yearOptionsOrder()).then((res) => {
|
||||||
const response = res.data.result;
|
const response = res.data.result;
|
||||||
fiscalyearOP.value = [{ id: 0, name: "ทั้งหมด" }];
|
fiscalyearOP.value = [{ id: 0, name: "ทั้งหมด" }];
|
||||||
|
|
@ -166,7 +53,7 @@ const fiscalYearFilter = async () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
// รายการข้อมูลประเภทคำสั่ง
|
// รายการข้อมูลประเภทคำสั่ง
|
||||||
const OrderType = ref<string>("");
|
const OrderType = ref<string>("");
|
||||||
|
|
@ -187,11 +74,13 @@ const addedOrderStatusValues: string[] = [];
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
const filterRef = ref<any>(null);
|
const filterRef = ref<any>(null);
|
||||||
|
|
||||||
|
/** ล้างค่า input */
|
||||||
function resetFilter() {
|
function resetFilter() {
|
||||||
filterKeyword.value = "";
|
filterKeyword.value = "";
|
||||||
filterRef.value.focus();
|
filterRef.value.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** ประเภทครับสั่ง ฟิลเตอร์ */
|
||||||
async function OrderTypeFilter() {
|
async function OrderTypeFilter() {
|
||||||
await http
|
await http
|
||||||
.get(config.API.typeOrder())
|
.get(config.API.typeOrder())
|
||||||
|
|
@ -217,6 +106,7 @@ async function searchFilterTable() {
|
||||||
stroe.filterListOrder(OrderType.value, OrderStatus.value, fiscalyear.value);
|
stroe.filterListOrder(OrderType.value, OrderStatus.value, fiscalyear.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** สถานะคำสั่ง ฟิลเตอร์ */
|
||||||
async function OrderStatusFilter() {
|
async function OrderStatusFilter() {
|
||||||
for (let data of stroe.mainData) {
|
for (let data of stroe.mainData) {
|
||||||
const OrderStatusValue = data.orderStatusName;
|
const OrderStatusValue = data.orderStatusName;
|
||||||
|
|
@ -272,6 +162,32 @@ function filterSelector(val: any, update: Function, refData: string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function fetchOrderlist() {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.get(config.API.listOrder())
|
||||||
|
.then((res: any) => {
|
||||||
|
const data = res.data.result;
|
||||||
|
const typeid = OrderTypeOption.value.map((e) => e.id);
|
||||||
|
|
||||||
|
const filterListOrder = data.filter((e: any) =>
|
||||||
|
typeid.includes(e.orderTypeValue)
|
||||||
|
);
|
||||||
|
|
||||||
|
stroe.fetchOrder(filterListOrder);
|
||||||
|
})
|
||||||
|
.catch((e: any) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(async () => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// สร้างคำสั่งใหม่
|
||||||
|
function clickAdd() {
|
||||||
|
router.push({ name: "disciplineOrderAdd" });
|
||||||
|
}
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fiscalYearFilter();
|
await fiscalYearFilter();
|
||||||
await OrderTypeFilter();
|
await OrderTypeFilter();
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import router from "@/router";
|
|
||||||
/** importType */
|
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
/** importStroe */
|
|
||||||
|
import router from "@/router";
|
||||||
import { useOrderStore } from "@/modules/11_discipline/store/OrderStore";
|
import { useOrderStore } from "@/modules/11_discipline/store/OrderStore";
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
|
|
||||||
const OrderStore = useOrderStore();
|
const OrderStore = useOrderStore();
|
||||||
|
|
||||||
/** รับ props มาจากหน้าหลัก */
|
/** รับ props มาจากหน้าหลัก */
|
||||||
|
|
@ -190,7 +190,7 @@ const pagination = ref({
|
||||||
* @param id id ออกคำสั่ง
|
* @param id id ออกคำสั่ง
|
||||||
* @param status status
|
* @param status status
|
||||||
*/
|
*/
|
||||||
const redirectToPage = (id?: string, status?: string) => {
|
function redirectToPage(id?: string, status?: string) {
|
||||||
let step = 1;
|
let step = 1;
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case "จัดทำร่างคำสั่ง":
|
case "จัดทำร่างคำสั่ง":
|
||||||
|
|
@ -207,13 +207,14 @@ const redirectToPage = (id?: string, status?: string) => {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
router.push(`/discipline-order/detail/${id}?step=${step}`);
|
router.push(`/discipline-order/detail/${id}?step=${step}`);
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ฟังชั่น redirect
|
* ฟังชั่น redirect
|
||||||
* @param id id ออกคำสั่ง
|
* @param id id ออกคำสั่ง
|
||||||
* @param status status
|
* @param status status
|
||||||
*/
|
*/
|
||||||
const redirectToDetailPage = (id?: string, status?: string) => {
|
function redirectToDetailPage(id?: string, status?: string) {
|
||||||
let step = 1;
|
let step = 1;
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case "จัดทำร่างคำสั่ง":
|
case "จัดทำร่างคำสั่ง":
|
||||||
|
|
@ -230,7 +231,7 @@ const redirectToDetailPage = (id?: string, status?: string) => {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
router.push(`/discipline-order-detail/detail/${id}?step=${step}`);
|
router.push(`/discipline-order-detail/detail/${id}?step=${step}`);
|
||||||
};
|
}
|
||||||
|
|
||||||
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,13 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, watchEffect, watch, type PropType } from "vue";
|
import { ref, computed, watchEffect, watch, type PropType } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
||||||
import type { directorType } from "@/modules/11_discipline/interface/index/Main";
|
import type { directorType } from "@/modules/11_discipline/interface/index/Main";
|
||||||
|
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
const $q = useQuasar();
|
|
||||||
const selected = ref<directorType[]>([]);
|
const selected = ref<directorType[]>([]);
|
||||||
const mixin = useCounterMixin();
|
|
||||||
const { showLoader, success, messageError, dialogConfirm, hideLoader } = mixin;
|
|
||||||
const currentPage = ref<number>(1);
|
const currentPage = ref<number>(1);
|
||||||
/** ค้นหาคอลัม */
|
/** ค้นหาคอลัม */
|
||||||
const visibleColumns2 = ref<string[]>([
|
const visibleColumns2 = ref<string[]>([
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,14 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {
|
import { ref, watch } from "vue";
|
||||||
ref,
|
|
||||||
computed,
|
|
||||||
watchEffect,
|
|
||||||
watch,
|
|
||||||
type PropType,
|
|
||||||
onMounted,
|
|
||||||
} from "vue";
|
|
||||||
import { QForm, useQuasar } from "quasar";
|
import { QForm, useQuasar } from "quasar";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { showLoader, success, messageError, dialogConfirm, hideLoader } = mixin;
|
const { dialogConfirm } = mixin;
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modal: Boolean,
|
modal: Boolean,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch } from "vue";
|
import { ref, watch } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,12 @@ interface FileLists {
|
||||||
pathName: string; //link file
|
pathName: string; //link file
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface HistoryResultCommand {
|
||||||
|
commandSubject: string;
|
||||||
|
createdAt: Date|null;
|
||||||
|
lastUpdatedAt: Date|null;
|
||||||
|
}
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
DataOption,
|
DataOption,
|
||||||
InvestigatefactsDataRowType,
|
InvestigatefactsDataRowType,
|
||||||
|
|
@ -82,4 +88,5 @@ export type {
|
||||||
FileLists,
|
FileLists,
|
||||||
DataOptioGroup,
|
DataOptioGroup,
|
||||||
DataOptionYear,
|
DataOptionYear,
|
||||||
|
HistoryResultCommand
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,6 @@ interface FormRef {
|
||||||
firstname: object | null;
|
firstname: object | null;
|
||||||
lastname: object | null;
|
lastname: object | null;
|
||||||
position: object | null;
|
position: object | null;
|
||||||
// phone: object | null;
|
|
||||||
// email: object | null;
|
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
}
|
}
|
||||||
interface typeOp {
|
interface typeOp {
|
||||||
|
|
|
||||||
|
|
@ -41,18 +41,6 @@ interface Director {
|
||||||
prefix: string;
|
prefix: string;
|
||||||
total?: number;
|
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 {
|
interface FormData {
|
||||||
respondentType: string;
|
respondentType: string;
|
||||||
|
|
@ -93,37 +81,6 @@ interface ExtendHistoryObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DisciplinaryRef {
|
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;
|
|
||||||
// date: object | null;
|
|
||||||
// dateEnd: object | null;
|
|
||||||
// daysExtend: object | null;
|
|
||||||
// disciplinaryDateResult: 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;
|
[key: string]: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,18 +47,6 @@ interface ArrayPerson {
|
||||||
phone: string;
|
phone: string;
|
||||||
}
|
}
|
||||||
interface MyObjectInvestigateRef {
|
interface MyObjectInvestigateRef {
|
||||||
// complaint: object | null;
|
|
||||||
// complaintdetail: object | null;
|
|
||||||
// investigationDescription: object | null;
|
|
||||||
// fault: object | null;
|
|
||||||
// fileComplaint: object | null;
|
|
||||||
// date: object | null;
|
|
||||||
// dateEnd: object | null;
|
|
||||||
// investigationDetail: object | null;
|
|
||||||
// daysExtend: object | null;
|
|
||||||
// investigationStatusResult: object | null;
|
|
||||||
// investigationCauseText: object | null;
|
|
||||||
// result: object | null;
|
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,6 @@ export const useAppealComplainStore = defineStore("AppealComplainStore", () => {
|
||||||
visibleColumns,
|
visibleColumns,
|
||||||
columns,
|
columns,
|
||||||
fetchAppealComplain,
|
fetchAppealComplain,
|
||||||
// filterSelector,
|
|
||||||
typeOptions,
|
typeOptions,
|
||||||
statusOptions,
|
statusOptions,
|
||||||
fiscalyearOP,
|
fiscalyearOP,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||||
|
|
||||||
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
||||||
import type {
|
import type {
|
||||||
|
|
@ -8,8 +10,9 @@ import type {
|
||||||
DataListRow,
|
DataListRow,
|
||||||
ocListType,
|
ocListType,
|
||||||
} from "@/modules/11_discipline/interface/response/complaint";
|
} from "@/modules/11_discipline/interface/response/complaint";
|
||||||
|
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
|
||||||
const mainStore = useDisciplineMainStore();
|
const mainStore = useDisciplineMainStore();
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
import type { Persons } from "@/modules/11_discipline/interface/request/disciplinary";
|
||||||
import type {
|
import type {
|
||||||
investigateDisDataRowType,
|
investigateDisDataRowType,
|
||||||
DataOption,
|
DataOption,
|
||||||
|
|
@ -9,8 +13,7 @@ import type {
|
||||||
DataOptioGroup,
|
DataOptioGroup,
|
||||||
DataNumberOption,
|
DataNumberOption,
|
||||||
} from "@/modules/11_discipline/interface/index/Main";
|
} from "@/modules/11_discipline/interface/index/Main";
|
||||||
import type { Persons } from "@/modules/11_discipline/interface/request/disciplinary";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai } = mixin;
|
const { date2Thai } = mixin;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import type {
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai } = mixin;
|
const { date2Thai } = mixin;
|
||||||
|
|
||||||
export const useOrderStore = defineStore("DisciplineOrder", () => {
|
export const useOrderStore = defineStore("DisciplineOrder", () => {
|
||||||
const columns = ref<QTableProps["columns"]>([]);
|
const columns = ref<QTableProps["columns"]>([]);
|
||||||
const visibleColumns = ref<string[]>([]);
|
const visibleColumns = ref<string[]>([]);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
||||||
|
|
||||||
export const useReportDataStore = defineStore("DisciplineReport11", () => {
|
export const useReportDataStore = defineStore("DisciplineReport11", () => {
|
||||||
const faultOp = ref<DataOption[]>();
|
const faultOp = ref<DataOption[]>();
|
||||||
const ocSelectOp = ref<DataOption[]>();
|
const ocSelectOp = ref<DataOption[]>();
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
DataOption,
|
DataOption,
|
||||||
directorType,
|
directorType,
|
||||||
|
|
@ -9,9 +13,7 @@ import type {
|
||||||
DataResult,
|
DataResult,
|
||||||
DataResultList,
|
DataResultList,
|
||||||
} from "@/modules/11_discipline/interface/response/result";
|
} from "@/modules/11_discipline/interface/response/result";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
|
|
||||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const storeMain = useDisciplineMainStore();
|
const storeMain = useDisciplineMainStore();
|
||||||
const { date2Thai } = mixin;
|
const { date2Thai } = mixin;
|
||||||
|
|
@ -22,7 +24,6 @@ export const useDisciplineResultStore = defineStore(
|
||||||
const tabMenu = ref<string>("result");
|
const tabMenu = ref<string>("result");
|
||||||
const rows = ref<DataResultList[]>([]);
|
const rows = ref<DataResultList[]>([]);
|
||||||
const rows2 = ref<directorType[]>([]);
|
const rows2 = ref<directorType[]>([]);
|
||||||
const selected = ref<directorType[]>([]);
|
|
||||||
|
|
||||||
const complainantoptions = ref<DataOption[]>(
|
const complainantoptions = ref<DataOption[]>(
|
||||||
storeMain.complainantoptionsMain
|
storeMain.complainantoptionsMain
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,14 @@
|
||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
listData,
|
listData,
|
||||||
dataType,
|
dataType,
|
||||||
DataOption,
|
DataOption,
|
||||||
} from "@/modules/11_discipline/interface/response/suspend";
|
} from "@/modules/11_discipline/interface/response/suspend";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
|
|
||||||
export const useDisciplineSuspendStore = defineStore(
|
export const useDisciplineSuspendStore = defineStore(
|
||||||
"disciplineSuspendStore",
|
"disciplineSuspendStore",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
import { ref } from "vue";
|
||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import { ref } from "vue";
|
|
||||||
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
||||||
import type { ArrayPersonAdd } from "@/modules/11_discipline/interface/response/investigate";
|
import type { ArrayPersonAdd } from "@/modules/11_discipline/interface/response/investigate";
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue