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">
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import Form from "@/modules/11_discipline/components/1_Complaint/Form.vue";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import config from "@/app.config";
|
||||
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 mixin = useCounterMixin();
|
||||
|
||||
const { showLoader, hideLoader, success, messageError } = mixin;
|
||||
const router = useRouter();
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, hideLoader, success, messageError } = mixin;
|
||||
|
||||
/** บันทึกข้อมูล */
|
||||
async function onSubmit(data: any) {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,13 @@
|
|||
<script setup lang="ts">
|
||||
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 { 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 {
|
||||
FormData,
|
||||
|
|
@ -11,11 +15,8 @@ import type {
|
|||
ArrayFileList,
|
||||
} from "@/modules/11_discipline/interface/request/complaint";
|
||||
|
||||
import config from "@/app.config";
|
||||
import http from "@/plugins/http";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||
import Form from "@/modules/11_discipline/components/1_Complaint/Form.vue";
|
||||
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
||||
|
||||
const mainStore = useDisciplineMainStore();
|
||||
const $q = useQuasar();
|
||||
|
|
|
|||
|
|
@ -1,24 +1,23 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive, watch, watchEffect } from "vue";
|
||||
import { ref, onMounted, reactive, watch } from "vue";
|
||||
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 {
|
||||
FormData,
|
||||
ArrayFileList,
|
||||
} 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 DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
||||
import type { OptionData } from "@/modules/07_insignia/interface/index/Main";
|
||||
|
||||
const $q = useQuasar();
|
||||
const fileDocDataUpload = ref<File[]>([]);
|
||||
|
|
@ -167,53 +166,6 @@ function confirmDelete(id: string) {
|
|||
.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 ค่าที่ได้คืนมา
|
||||
|
|
@ -296,12 +248,6 @@ async function getOc(activeId: string) {
|
|||
.finally(() => {
|
||||
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 ของผู้ถูกร้อง
|
||||
*/
|
||||
function deletePerson(id: string) {
|
||||
// dialogRemove($q, () => {
|
||||
const dataRow = mainStore.rowsAdd;
|
||||
const updatedRows = dataRow.filter((item: any) => item.personId !== id);
|
||||
mainStore.rowsAdd = updatedRows;
|
||||
changeFormData();
|
||||
// });
|
||||
}
|
||||
|
||||
/** ช่องทางการร้องเรียน และฟังก์ชั่นการดึงข้อมูลช่องทางการร้องเรียนมาจาก api*/
|
||||
|
|
@ -365,16 +309,7 @@ function updatemodalPersonal(modal: boolean) {
|
|||
modalPersonal.value = modal;
|
||||
}
|
||||
|
||||
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
||||
onMounted(() => {
|
||||
mainStore.rowsAdd = [];
|
||||
getListChannel();
|
||||
|
||||
getActive();
|
||||
});
|
||||
|
||||
const optionOrganization = ref<any[]>(complainstStore.organizationIdOp);
|
||||
|
||||
function filterOptionFnOrganization(val: string, update: Function) {
|
||||
update(() => {
|
||||
optionOrganization.value = complainstStore.organizationIdOp.filter(
|
||||
|
|
@ -383,7 +318,6 @@ function filterOptionFnOrganization(val: string, update: Function) {
|
|||
});
|
||||
}
|
||||
const optionAgency = ref<any[]>(complainstStore.consideredAgencytoptions);
|
||||
|
||||
function filterOptionFnAgency(val: string, update: Function) {
|
||||
update(() => {
|
||||
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>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
|
|
@ -32,12 +32,14 @@ const rowsPerPage = ref<number>(10);
|
|||
const toptitle = ref<number>(0);
|
||||
const statusFilter = ref<string>("NEW");
|
||||
const option = ref<any[]>(complainstStore.statusOptions);
|
||||
|
||||
async function updatePagingProp(rowPerpage: number, pageCurrent: number) {
|
||||
rowsPerPage.value = rowPerpage;
|
||||
page.value = pageCurrent;
|
||||
await getList();
|
||||
}
|
||||
|
||||
/** ดึงข้อมูล เรื่องร้องเรียน */
|
||||
async function getList() {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -69,10 +71,7 @@ function redirectToPageadd() {
|
|||
router.push(`/discipline/complaints/add`);
|
||||
}
|
||||
|
||||
function filterFn() {
|
||||
getList();
|
||||
}
|
||||
|
||||
/** ล้างค่าใน input */
|
||||
function resetFilter() {
|
||||
filterKeyword.value = "";
|
||||
if (filterRef.value) {
|
||||
|
|
@ -165,7 +164,7 @@ onMounted(async () => {
|
|||
ref="filterRef"
|
||||
outlined
|
||||
placeholder="ค้นหา"
|
||||
@keydown.enter.prevent="filterFn"
|
||||
@keydown.enter.prevent="getList()"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="filterKeyword == ''" name="search" />
|
||||
|
|
|
|||
|
|
@ -145,6 +145,14 @@ function updateProp(newPagination: any, page: number) {
|
|||
emit("update:pagination", newPagination, page);
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังชั่นสำหรับ เปลี่ยน route ตาม id ที่รับมา
|
||||
* @param id ไอดีระบุ
|
||||
*/
|
||||
function onDetail(id: string) {
|
||||
router.push(`/discipline/complaints-detail/${id}`);
|
||||
}
|
||||
|
||||
watch(
|
||||
() => currentPage.value,
|
||||
() => {
|
||||
|
|
@ -160,14 +168,6 @@ watch(
|
|||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ฟังชั่นสำหรับ เปลี่ยน route ตาม id ที่รับมา
|
||||
* @param id ไอดีระบุ
|
||||
*/
|
||||
function onDetail(id: string) {
|
||||
router.push(`/discipline/complaints-detail/${id}`);
|
||||
}
|
||||
|
||||
/** เริ่มโหลดหน้า page เอาข้อมูลไปเก็บ ใน store*/
|
||||
onMounted(() => {
|
||||
complainstStore.columns = columns.value;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
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();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,20 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch, type PropType } from "vue";
|
||||
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 dayGridPlugin from "@fullcalendar/daygrid";
|
||||
import timeGridPlugin from "@fullcalendar/timegrid";
|
||||
import interactionPlugin from "@fullcalendar/interaction";
|
||||
import allLocales from "@fullcalendar/core/locales-all";
|
||||
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 { monthYear2Thai, showLoader, hideLoader, messageError, dateToISO } =
|
||||
|
|
@ -36,7 +37,7 @@ const props = defineProps({
|
|||
default: false,
|
||||
},
|
||||
close: {
|
||||
type: Boolean,
|
||||
type: Function,
|
||||
default: true,
|
||||
},
|
||||
});
|
||||
|
|
@ -163,7 +164,7 @@ watch(
|
|||
unelevated
|
||||
round
|
||||
dense
|
||||
@click="props.close"
|
||||
@click="props.close?.()"
|
||||
style="color: #ff8080; background-color: #ffdede"
|
||||
/>
|
||||
</q-toolbar>
|
||||
|
|
|
|||
|
|
@ -1,24 +1,25 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch, onMounted } from "vue";
|
||||
import FullCalendar from "@fullcalendar/vue3";
|
||||
import dayGridPlugin from "@fullcalendar/daygrid";
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
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 timeGridPlugin from "@fullcalendar/timegrid";
|
||||
import interactionPlugin from "@fullcalendar/interaction";
|
||||
import allLocales from "@fullcalendar/core/locales-all";
|
||||
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";
|
||||
import FullCalendar from "@fullcalendar/vue3";
|
||||
import dayGridPlugin from "@fullcalendar/daygrid";
|
||||
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
const { monthYear2Thai, showLoader, hideLoader, messageError } = mixin;
|
||||
|
||||
const $q = useQuasar();
|
||||
/**
|
||||
* Option ของปฏิทิน
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
<script setup lang="ts">
|
||||
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 { useQuasar } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
||||
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 as FormDataComplaint,
|
||||
|
|
@ -15,9 +17,9 @@ import type {
|
|||
ArrayFileList,
|
||||
} from "@/modules/11_discipline/interface/request/complaint";
|
||||
|
||||
import config from "@/app.config";
|
||||
import http from "@/plugins/http";
|
||||
import type { ArrayPersonAdd } from "../../interface/response/investigate";
|
||||
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"; //สืบสวนข้อเท็จจริง
|
||||
|
||||
const mainStore = useDisciplineMainStore();
|
||||
|
||||
|
|
@ -110,6 +112,7 @@ const dataComplaints = reactive<FormDataComplaint>({
|
|||
disciplineComplaintDocs: [fileListObjComplaint],
|
||||
});
|
||||
|
||||
/** ดึงข้อมูลร้องเรียน */
|
||||
async function getDataComplaint() {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -148,6 +151,7 @@ async function getDataComplaint() {
|
|||
});
|
||||
}
|
||||
|
||||
/** ดึงข้อมูลรายละเอียด */
|
||||
function getData() {
|
||||
showLoader();
|
||||
http
|
||||
|
|
@ -228,6 +232,7 @@ function sentInvestigate() {
|
|||
}
|
||||
}
|
||||
|
||||
/** ส่งไปสอบสวน */
|
||||
function sentConfirmNoPerson() {
|
||||
showLoader();
|
||||
http
|
||||
|
|
@ -246,6 +251,7 @@ function sentConfirmNoPerson() {
|
|||
});
|
||||
}
|
||||
|
||||
/** ปิด popup */
|
||||
function closePopup() {
|
||||
modalPopup.value = false;
|
||||
}
|
||||
|
|
@ -320,14 +326,6 @@ function emitPerson(data: FormData[]) {
|
|||
});
|
||||
}
|
||||
|
||||
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
||||
onMounted(() => {
|
||||
getData();
|
||||
if (store.tabMenu == "complaints") {
|
||||
getDataComplaint();
|
||||
}
|
||||
});
|
||||
|
||||
watch(
|
||||
() => store.tabMenu,
|
||||
() => {
|
||||
|
|
@ -338,6 +336,14 @@ watch(
|
|||
}
|
||||
}
|
||||
);
|
||||
|
||||
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
||||
onMounted(() => {
|
||||
getData();
|
||||
if (store.tabMenu == "complaints") {
|
||||
getDataComplaint();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
|
|
@ -1,33 +1,32 @@
|
|||
<script setup lang="ts">
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { onMounted, ref, watch, reactive, computed } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRoute } from "vue-router";
|
||||
import { onMounted, ref, watch, reactive, computed } from "vue";
|
||||
import moment from "moment";
|
||||
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
||||
import DialogDirector from "@/modules/11_discipline/components/DialogDirector.vue";
|
||||
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
||||
import Table from "@/modules/11_discipline/components/DirectorTable.vue";
|
||||
|
||||
import config from "@/app.config";
|
||||
import http from "@/plugins/http";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
||||
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
||||
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 DialogDuty from "@/modules/11_discipline/components/DialogDuty.vue";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||
|
||||
import type { FormData } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||
|
||||
import config from "@/app.config";
|
||||
import http from "@/plugins/http";
|
||||
import type { OptionData } from "@/modules/07_insignia/interface/index/Main";
|
||||
import Table from "@/modules/11_discipline/components/DirectorTable.vue";
|
||||
import DialogDirector from "@/modules/11_discipline/components/DialogDirector.vue";
|
||||
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
||||
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
||||
|
||||
const modalPersonal = ref<boolean>(false);
|
||||
const personId = ref<string>("");
|
||||
|
||||
const $q = useQuasar();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const checkRoutePermisson = ref<boolean>(
|
||||
route.name == "disciplineInvestigatefactsDetail"
|
||||
);
|
||||
|
|
@ -150,6 +149,8 @@ const initialPagination = ref<any>({
|
|||
rowsPerPage: 0,
|
||||
});
|
||||
|
||||
const organization = ref<OptionData>();
|
||||
|
||||
const calendarModal = ref<boolean>(false);
|
||||
const calendarModalclose = () => (calendarModal.value = !calendarModal.value);
|
||||
|
||||
|
|
@ -185,7 +186,6 @@ function onSubmit() {
|
|||
});
|
||||
}
|
||||
|
||||
const organization = ref<OptionData>();
|
||||
/**
|
||||
* ฟังชั้นคำนวณเวลาวันที่สิ้นสุดจาก วันที่สิ้นสุดการสืบสวน
|
||||
* @param val จำนวนวันที่ต้องการขยาย
|
||||
|
|
@ -198,6 +198,7 @@ async function calEndDate(val: string) {
|
|||
);
|
||||
}
|
||||
|
||||
/** reset วันที่สืบสวน */
|
||||
function resetExtend() {
|
||||
formData.investigationDateEnd = props.data.investigationDateEnd;
|
||||
formData.investigationDaysExtend = 0;
|
||||
|
|
@ -213,6 +214,391 @@ function clickClose() {
|
|||
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
|
||||
* เมื่อมีข้อมูล
|
||||
|
|
@ -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(
|
||||
() => formData.investigationDetail,
|
||||
(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 () => {
|
||||
mainStore.rowsAdd = [];
|
||||
getActive();
|
||||
|
|
|
|||
|
|
@ -1,32 +1,24 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, useAttrs, onMounted, watch } from "vue";
|
||||
|
||||
import router from "@/router";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { ref, useAttrs, onMounted, watch } from "vue";
|
||||
|
||||
import config from "@/app.config";
|
||||
import http from "@/plugins/http";
|
||||
|
||||
import router from "@/router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
||||
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 mixin = useCounterMixin();
|
||||
const dataInvestigate = useInvestigateFactStore();
|
||||
const { messageError, showLoader, hideLoader } = mixin;
|
||||
|
||||
const option = ref<any[]>(dataInvestigate.statusOptions);
|
||||
|
||||
/** ค้นหาข้อมูลในตาราง */
|
||||
const filterKeyword = ref<string>("");
|
||||
const filterRef = ref<HTMLInputElement | null>(null);
|
||||
function resetFilter() {
|
||||
filterKeyword.value = "";
|
||||
if (filterRef.value) {
|
||||
filterRef.value.focus();
|
||||
getList();
|
||||
}
|
||||
}
|
||||
const statusFilter = ref<string>("NEW");
|
||||
const currentPage = ref<number>(1);
|
||||
const maxPage = ref<number>(1);
|
||||
|
|
@ -43,23 +35,18 @@ const pagination = ref({
|
|||
rowsPerPage: rowsPerPage.value,
|
||||
});
|
||||
|
||||
watch(
|
||||
() => currentPage.value,
|
||||
() => {
|
||||
rowsPerPage.value = pagination.value.rowsPerPage;
|
||||
const attrs = ref<any>(useAttrs());
|
||||
|
||||
/** ล้างค่า Input */
|
||||
function resetFilter() {
|
||||
filterKeyword.value = "";
|
||||
if (filterRef.value) {
|
||||
filterRef.value.focus();
|
||||
getList();
|
||||
}
|
||||
);
|
||||
|
||||
watch(
|
||||
() => pagination.value.rowsPerPage,
|
||||
() => {
|
||||
rowsPerPage.value = pagination.value.rowsPerPage;
|
||||
currentPage.value = 1;
|
||||
getList();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/** ดึงข้อมูลบสวน */
|
||||
async function getList() {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -86,8 +73,6 @@ async function getList() {
|
|||
});
|
||||
}
|
||||
|
||||
const attrs = ref<any>(useAttrs());
|
||||
|
||||
/**
|
||||
* ไปหน้าแก้ไข
|
||||
* @param id ไอดีเฉพาะ รายบุคคล
|
||||
|
|
@ -105,10 +90,6 @@ async function detailPage(id: string) {
|
|||
router.push(`/discipline-detail/investigatefacts/${id}`);
|
||||
}
|
||||
|
||||
function filterFn() {
|
||||
getList();
|
||||
}
|
||||
|
||||
/**
|
||||
* function ค้นหาข้อมูลใน option
|
||||
* @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
|
||||
*/
|
||||
|
|
@ -180,7 +178,7 @@ onMounted(async () => {
|
|||
ref="filterRef"
|
||||
outlined
|
||||
placeholder="ค้นหา"
|
||||
@keydown.enter.prevent="filterFn"
|
||||
@keydown.enter.prevent="getList()"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="filterKeyword == ''" name="search" />
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
<script setup lang="ts">
|
||||
import Form from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import Form from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue";
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
/** บันทึกข้อมูลเเละ route กลับหน้าหลัก */
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import { useQuasar } from "quasar";
|
||||
import { ref, watch, type PropType } from "vue";
|
||||
|
||||
import { useQuasar } from "quasar";
|
||||
import FullCalendar from "@fullcalendar/vue3";
|
||||
import dayGridPlugin from "@fullcalendar/daygrid";
|
||||
import type { CalendarOptions } from "@fullcalendar/core";
|
||||
|
|
@ -34,7 +34,7 @@ const props = defineProps({
|
|||
default: false,
|
||||
},
|
||||
close: {
|
||||
type: Boolean,
|
||||
type: Function,
|
||||
default: true,
|
||||
},
|
||||
});
|
||||
|
|
@ -162,7 +162,7 @@ watch(
|
|||
unelevated
|
||||
round
|
||||
dense
|
||||
@click="props.close"
|
||||
@click="props.close?.()"
|
||||
style="color: #ff8080; background-color: #ffdede"
|
||||
/>
|
||||
</q-toolbar>
|
||||
|
|
|
|||
|
|
@ -1,24 +1,25 @@
|
|||
<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 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 timeGridPlugin from "@fullcalendar/timegrid";
|
||||
import interactionPlugin from "@fullcalendar/interaction";
|
||||
import allLocales from "@fullcalendar/core/locales-all";
|
||||
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 mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
const { monthYear2Thai, showLoader, hideLoader, messageError } = mixin;
|
||||
|
||||
/**
|
||||
* Option ของปฏิทิน
|
||||
|
|
@ -128,6 +129,44 @@ const reason = ref("ยกเลิกการลา");
|
|||
const model = ref(null);
|
||||
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() {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -151,74 +190,16 @@ async function fetchCalendar() {
|
|||
});
|
||||
}
|
||||
|
||||
function changCalendar() {
|
||||
fetchCalendar();
|
||||
}
|
||||
|
||||
/**
|
||||
* เรียกฟังก์ชันทั้งหมดตอนเรียกใช้ไฟล์นี้
|
||||
*/
|
||||
onMounted(async () => {
|
||||
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>
|
||||
<template>
|
||||
<div class="q-ma-sm">
|
||||
|
|
@ -418,13 +399,6 @@ const monthYearThai = (val: DataDateMonthObject) => {
|
|||
display: flex;
|
||||
justify-content: 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 {
|
||||
|
|
|
|||
|
|
@ -5,11 +5,9 @@ import { useRouter, useRoute } from "vue-router";
|
|||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
/**import component*/
|
||||
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 { useCounterMixin } from "@/stores/mixin";
|
||||
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||
|
||||
import type {
|
||||
PersonsArray,
|
||||
|
|
@ -23,20 +21,19 @@ import type {
|
|||
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||
|
||||
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 router = useRouter();
|
||||
const route = useRoute();
|
||||
const mixin = useCounterMixin();
|
||||
const store = useInvestigateDisStore();
|
||||
const { dialogConfirm, success, messageError, showLoader, hideLoader } = mixin;
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const mainStore = useDisciplineMainStore();
|
||||
|
||||
const isSaveInfo = ref<boolean>(false);
|
||||
const checkRoutePermisson = ref<boolean>(
|
||||
route.name == "disciplineDisciplinaryDetail"
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,17 +1,18 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive, watch, computed } from "vue";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useQuasar } from "quasar";
|
||||
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 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 {
|
||||
FormData,
|
||||
DisciplinaryRef,
|
||||
Director,
|
||||
PersonsArray,
|
||||
} from "@/modules/11_discipline/interface/request/disciplinary";
|
||||
|
|
@ -21,29 +22,19 @@ import type {
|
|||
responseType,
|
||||
directorType,
|
||||
} 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 DialogDirector from "@/modules/11_discipline/components/DialogDirector.vue";
|
||||
import Table from "@/modules/11_discipline/components/DirectorTable.vue";
|
||||
import UploadFile from "@/modules/11_discipline/components/UploadFile.vue";
|
||||
|
||||
/** import store*/
|
||||
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 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 $q = useQuasar();
|
||||
const route = useRoute();
|
||||
const complainstStore = useComplainstDataStore();
|
||||
const investigateDis = useInvestigateDisStore();
|
||||
const mainStore = useDisciplineMainStore();
|
||||
|
|
@ -58,9 +49,13 @@ const {
|
|||
success,
|
||||
} = mixin;
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const $q = useQuasar();
|
||||
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 checkRoutePermisson = ref<boolean>(
|
||||
route.name == "disciplineDisciplinaryDetail"
|
||||
);
|
||||
|
|
@ -77,7 +72,6 @@ const dutyVal = ref<string>();
|
|||
const commandNoVal = ref<string>();
|
||||
|
||||
const id = ref<string>(route.params.id as string);
|
||||
const isUpdate = ref<boolean>(false);
|
||||
const type = ref<string>("");
|
||||
const modal = ref<boolean>(false);
|
||||
const rows = ref<Director[]>([]);
|
||||
|
|
@ -408,18 +402,6 @@ function handleSave(returnData: any) {
|
|||
toggleModal();
|
||||
}
|
||||
|
||||
/**
|
||||
* เช็คข้อมูลจาก props
|
||||
* เมื่อมีข้อมูล
|
||||
* เก็บข้อมูลลง formData
|
||||
*/
|
||||
watch(
|
||||
() => props.data,
|
||||
async () => {
|
||||
await fetchDatadetail();
|
||||
}
|
||||
);
|
||||
|
||||
/** function เรียกรายชื่อหน่วยงาน*/
|
||||
/** ดึงข้อมูล active */
|
||||
async function getActive() {
|
||||
|
|
@ -523,11 +505,6 @@ const organization = ref<OptionData>();
|
|||
async function selectComplainant(val: string) {
|
||||
formData.organizationId = "";
|
||||
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) {
|
||||
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 */
|
||||
onMounted(async () => {
|
||||
mainStore.rowsAdd = [];
|
||||
|
|
|
|||
|
|
@ -2,23 +2,21 @@
|
|||
import { onMounted, ref } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
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 { 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 dataInvestigateDis = useInvestigateDisStore();
|
||||
const { showLoader, hideLoader } = mixin;
|
||||
const { fetchList } = dataInvestigateDis;
|
||||
|
||||
const rowsPerPage = ref<number>(10);
|
||||
const $q = useQuasar(); // show dialog
|
||||
const router = useRouter();
|
||||
const filter = ref<string>(""); //search data table
|
||||
const page = ref<number>(1);
|
||||
const maxPage = ref<number>(1);
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
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";
|
||||
|
||||
const dataInvestigateDis = useInvestigateDisStore();
|
||||
|
|
@ -112,21 +111,6 @@ function updateProp(newPagination: any, page: number) {
|
|||
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() {
|
||||
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>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
|
|
@ -1,24 +1,18 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch } from "vue";
|
||||
import { QForm, useQuasar } from "quasar";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import type { QTableProps } from "quasar";
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
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 mixin = useCounterMixin();
|
||||
const {
|
||||
showLoader,
|
||||
success,
|
||||
messageError,
|
||||
dialogConfirm,
|
||||
hideLoader,
|
||||
date2Thai,
|
||||
} = mixin;
|
||||
const listCheck = ref<string>("");
|
||||
const id = ref<string>("");
|
||||
const { showLoader, messageError, hideLoader, date2Thai } = mixin;
|
||||
|
||||
const props = defineProps({
|
||||
modal: Boolean,
|
||||
personId: {
|
||||
|
|
@ -27,7 +21,7 @@ const props = defineProps({
|
|||
},
|
||||
close: Function,
|
||||
});
|
||||
const rows = ref<any[]>([]);
|
||||
const rows = ref<HistoryResultCommand[]>([]);
|
||||
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,22 +1,20 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, computed, watchEffect, watch } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
import type { ResponseData } from "@/modules/05_placement/interface/response/Transfer";
|
||||
import type { OpType } from "@/modules/05_placement/interface/response/Main";
|
||||
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<[]>([]);
|
||||
const idPath = ref<string>(route.params.id as string);
|
||||
const type = ref<string>("");
|
||||
const rows = ref<DataListRow[]>([]);
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
const $q = useQuasar();
|
||||
const selected = ref<ResponseData[]>([]);
|
||||
const route = useRoute();
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
showLoader,
|
||||
|
|
@ -27,6 +25,12 @@ const {
|
|||
dialogMessageNotify,
|
||||
} = 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({
|
||||
data: {
|
||||
type: Object,
|
||||
|
|
@ -90,25 +94,6 @@ async function Ordersave() {
|
|||
props.getData?.();
|
||||
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([
|
||||
|
|
@ -132,7 +117,6 @@ async function fecthTypeOption() {
|
|||
await http
|
||||
.get(config.API.typeOrder())
|
||||
.then((res) => {
|
||||
// if (props.title == "ส่งไปออกคำสั่ง") {
|
||||
optionsType.value = res.data.result.filter(
|
||||
(e: OpType) =>
|
||||
e.commandCode === "C-PM-19" ||
|
||||
|
|
@ -143,13 +127,6 @@ async function fecthTypeOption() {
|
|||
e.commandCode === "C-PM-30" ||
|
||||
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) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -166,15 +143,6 @@ watchEffect(() => {
|
|||
rows.value = props.data.persons.filter(
|
||||
(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">
|
||||
import { onMounted, reactive, ref, watch } from "vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
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"; // สอบสวนความผิดทางวินัย
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||
|
||||
import type { DataListRow } from "@/modules/11_discipline/interface/request/result";
|
||||
import type {
|
||||
FormData as FormDataComplaint,
|
||||
|
|
@ -13,20 +16,21 @@ import type {
|
|||
ArrayFileList,
|
||||
} from "@/modules/11_discipline/interface/request/complaint";
|
||||
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 mainStore = useDisciplineMainStore();
|
||||
const mixin = useCounterMixin();
|
||||
const store = useDisciplineResultStore();
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
||||
const id = ref<string>(route.params.id as string);
|
||||
const titlePopup = ref<string>("");
|
||||
const idInvestigate = ref<string>("");
|
||||
|
|
@ -39,6 +43,7 @@ const dataDisciplinary = ref<object>([]);
|
|||
const checkRoutePermisson = ref<boolean>(
|
||||
route.name == "disciplineResultDetail"
|
||||
);
|
||||
|
||||
const dataInvestigatefacts = reactive<FormInvestigateFact>({
|
||||
id: "",
|
||||
idComplaint: "",
|
||||
|
|
@ -302,12 +307,6 @@ onMounted(async () => {
|
|||
color="public"
|
||||
@click="sentIssue('ส่งไปออกคำสั่ง')"
|
||||
/>
|
||||
<!-- <q-btn
|
||||
v-if="status === 'DONE'"
|
||||
label="ส่งไปออกคำสั่งงดโทษ/เพิ่มโทษ"
|
||||
color="blue-6"
|
||||
@click="sentIssue('ส่งไปออกคำสั่งงดโทษ/เพิ่มโทษ')"
|
||||
/> -->
|
||||
</div>
|
||||
</div>
|
||||
<q-card bordered flat class="col-12">
|
||||
|
|
|
|||
|
|
@ -1,30 +1,25 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive, watch } from "vue";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
||||
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 {
|
||||
FormData,
|
||||
FormRef,
|
||||
DataOption,
|
||||
DataOptionRes,
|
||||
FileArray,
|
||||
} from "@/modules/11_discipline/interface/request/result";
|
||||
|
||||
const modalPersonal = ref<boolean>(false);
|
||||
const personId = ref<string>("");
|
||||
import DialogHistory from "@/modules/11_discipline/components/4_Result/DialogHistory.vue";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||
|
||||
const countNum = ref<number>(1);
|
||||
const mainStore = useDisciplineMainStore();
|
||||
const modalPerson = ref<boolean>(false);
|
||||
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
||||
|
||||
const dataStore = useDisciplineResultStore();
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
|
|
@ -36,8 +31,13 @@ const {
|
|||
dialogRemove,
|
||||
downloadRenameFileByLink,
|
||||
} = mixin;
|
||||
const router = useRouter();
|
||||
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>(
|
||||
route.name == "disciplineResultDetail"
|
||||
);
|
||||
|
|
@ -151,38 +151,6 @@ function onSubmit() {
|
|||
async function fetchDatadetail() {
|
||||
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) {
|
||||
return {
|
||||
|
|
@ -221,10 +189,7 @@ function uploadFile() {
|
|||
});
|
||||
}
|
||||
|
||||
function downloadFile(link: string) {
|
||||
window.open(link, "_blank");
|
||||
}
|
||||
|
||||
/** ลบไฟล์ */
|
||||
function deleteFile(id: string) {
|
||||
dialogRemove($q, () => confirmDelete(id));
|
||||
}
|
||||
|
|
@ -248,16 +213,19 @@ function confirmDelete(docid: string) {
|
|||
});
|
||||
}
|
||||
|
||||
/** เปิดรายละเอียด */
|
||||
function openDetial(id: string) {
|
||||
personalId.value = id;
|
||||
modalHistory.value = true;
|
||||
}
|
||||
|
||||
/** xbf ikp]tgvupf */
|
||||
function closeDetail() {
|
||||
modalHistory.value = false;
|
||||
personalId.value = "";
|
||||
}
|
||||
|
||||
/** เปิดรายละเอียด */
|
||||
function onclickViewinfo(id: string) {
|
||||
modalPersonal.value = true;
|
||||
personId.value = id;
|
||||
|
|
@ -266,6 +234,39 @@ function onclickViewinfo(id: string) {
|
|||
function updatemodalPersonal(modal: boolean) {
|
||||
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>
|
||||
<template>
|
||||
<div class="row col-12 bg-white">
|
||||
|
|
|
|||
|
|
@ -2,17 +2,18 @@
|
|||
import { onMounted, ref } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
import Table from "@/modules/11_discipline/components/4_Result/Table.vue";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
||||
|
||||
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 router = useRouter();
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const store = useDisciplineResultStore();
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
|
|
@ -28,6 +29,7 @@ const maxPage = ref<number>(1);
|
|||
const totalList = ref<number>(0);
|
||||
const filter = ref<string>("");
|
||||
const status = ref<string>("DONE");
|
||||
|
||||
/** function เรียกรายการสรุปผลการพิจารณาทางวินัย*/
|
||||
async function fetchListResult() {
|
||||
showLoader();
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
<script setup lang="ts">
|
||||
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";
|
||||
|
||||
const store = useDisciplineResultStore();
|
||||
const table = ref<any>(null);
|
||||
const filterRef = ref<any>(null);
|
||||
const attrs = ref<any>(useAttrs());
|
||||
const paging = ref<boolean>(true);
|
||||
const statusFilter = ref<string>("DONE");
|
||||
|
||||
const option = ref<any[]>(store.statusOptions);
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted } from "vue";
|
||||
import { VuePDF, usePDF } from "@tato30/vue-pdf";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useQuasar } from "quasar";
|
||||
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
||||
import { VuePDF, usePDF } from "@tato30/vue-pdf";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useReportDataStore } from "@/modules/11_discipline/store/ReportStore";
|
||||
|
||||
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
||||
|
||||
const date = ref<Date>();
|
||||
const dateEnd = ref<Date>();
|
||||
const route = useRoute();
|
||||
|
|
@ -17,7 +18,6 @@ const mixin = useCounterMixin();
|
|||
const { date2Thai } = mixin;
|
||||
const { filterFnOptionsType } = store;
|
||||
|
||||
const $q = useQuasar();
|
||||
const ocSelect = ref<string>("");
|
||||
const government = ref<string>("");
|
||||
const fault = ref<string>();
|
||||
|
|
@ -32,16 +32,6 @@ function backHistory() {
|
|||
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() {
|
||||
if (page.value < numOfPages.value) {
|
||||
|
|
|
|||
|
|
@ -1,27 +1,30 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, useAttrs, onMounted } from "vue";
|
||||
import { ref, onMounted } from "vue";
|
||||
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 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 { checkPermission } from "@/utils/permissions";
|
||||
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 isEdit = ref<boolean>(false);
|
||||
const isRead = ref<boolean>(false);
|
||||
const isId = 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 ของตาราง
|
||||
*/
|
||||
const pagination = ref({
|
||||
// sortBy: "desc",
|
||||
descending: false,
|
||||
page: 1,
|
||||
rowsPerPage: 10,
|
||||
|
|
@ -114,15 +116,7 @@ async function deleteData(id: string) {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ไปหน้า แก้ไข
|
||||
* @param id type
|
||||
*/
|
||||
function editPage(data: typeItem) {
|
||||
dataStore.getType(data.name);
|
||||
router.push(`/discipline/channel/${data.id}`);
|
||||
}
|
||||
|
||||
/** ปิด popup */
|
||||
function closeDialog() {
|
||||
modal.value = false;
|
||||
channel.value = "";
|
||||
|
|
@ -130,6 +124,7 @@ function closeDialog() {
|
|||
isRead.value = false;
|
||||
}
|
||||
|
||||
/** class input */
|
||||
function inputEdit(val: boolean) {
|
||||
return {
|
||||
"full-width cursor-pointer ": val,
|
||||
|
|
@ -137,6 +132,7 @@ function inputEdit(val: boolean) {
|
|||
};
|
||||
}
|
||||
|
||||
/** บันทึกช่องทางการร้องเรียน */
|
||||
function onSubmit() {
|
||||
const url = isEdit.value
|
||||
? config.API.complaintChannelbyId(isId.value)
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
<script setup lang="ts">
|
||||
import Form from "@/modules/11_discipline/components/6_BasicInformation/Director/Form.vue";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
import type { FormDataPost } from "@/modules/11_discipline/interface/request/director";
|
||||
|
||||
const $q = useQuasar();
|
||||
|
|
|
|||
|
|
@ -1,19 +1,20 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive, watch, onMounted } from "vue";
|
||||
import { ref, reactive, watch } from "vue";
|
||||
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 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";
|
||||
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { dialogConfirm, success, showLoader, hideLoader, messageError } = mixin;
|
||||
const isReadonly = ref<boolean>(false);
|
||||
const { success, showLoader, hideLoader, messageError } = mixin;
|
||||
|
||||
const isReadonly = ref<boolean>(false);
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
const personalId = defineModel<string>("personalId", { required: true });
|
||||
const isEdit = defineModel<boolean>("isEdit", { required: true });
|
||||
|
|
@ -21,6 +22,7 @@ const isEdit = defineModel<boolean>("isEdit", { required: true });
|
|||
const props = defineProps({
|
||||
getList: Function,
|
||||
});
|
||||
|
||||
const data = reactive<FormData>({
|
||||
personalId: "",
|
||||
prefix: "",
|
||||
|
|
@ -39,6 +41,7 @@ function inputEdit(val: boolean) {
|
|||
};
|
||||
}
|
||||
|
||||
/** ปิด popup เเละ clear */
|
||||
function closeDialog() {
|
||||
modal.value = false;
|
||||
personalId.value = "";
|
||||
|
|
@ -52,6 +55,7 @@ function closeDialog() {
|
|||
data.qualification = "";
|
||||
}
|
||||
|
||||
/** บันทึก กรรมการ */
|
||||
function onSubmit() {
|
||||
showLoader();
|
||||
http
|
||||
|
|
|
|||
|
|
@ -1,18 +1,14 @@
|
|||
<script setup lang="ts">
|
||||
import {
|
||||
ref,
|
||||
computed,
|
||||
watchEffect,
|
||||
watch,
|
||||
type PropType,
|
||||
onMounted,
|
||||
} from "vue";
|
||||
import { ref, watch } from "vue";
|
||||
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 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 mixin = useCounterMixin();
|
||||
|
|
|
|||
|
|
@ -1,17 +1,20 @@
|
|||
<script setup lang="ts">
|
||||
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 router from "@/router";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
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 personalId = ref<string>(route.params.id.toString());
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { messageError, showLoader, hideLoader, dialogConfirm, success } = mixin;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive, watch } from "vue";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useQuasar } from "quasar";
|
||||
import type { QTableProps } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
import type {
|
||||
FormData,
|
||||
FormRef,
|
||||
|
|
@ -10,8 +14,6 @@ import type {
|
|||
ResponsePreson,
|
||||
tableType,
|
||||
} from "@/modules/11_discipline/interface/request/director";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||
|
||||
|
|
@ -142,12 +144,8 @@ const columnsRespondent = ref<QTableProps["columns"]>([
|
|||
const visibleColumnsRespondent = ref<string[]>([
|
||||
"info",
|
||||
"no",
|
||||
// "idcard",
|
||||
"name",
|
||||
// "posNo",
|
||||
"position",
|
||||
// "positionLevel",
|
||||
// "salary",
|
||||
"organization",
|
||||
]);
|
||||
|
||||
|
|
@ -168,6 +166,7 @@ function onValidate() {
|
|||
}
|
||||
}
|
||||
|
||||
/** class input */
|
||||
function inputEdit(val: boolean) {
|
||||
return {
|
||||
"full-width cursor-pointer ": val,
|
||||
|
|
@ -180,6 +179,7 @@ function updateSelect() {
|
|||
search.value = "";
|
||||
}
|
||||
|
||||
/** ค้าหาข้อมูล */
|
||||
async function searchInput() {
|
||||
searchRef.value.validate();
|
||||
if (!searchRef.value.hasError) {
|
||||
|
|
@ -187,6 +187,7 @@ async function searchInput() {
|
|||
}
|
||||
}
|
||||
|
||||
/** ดึงข้อมูล */
|
||||
async function getSearch() {
|
||||
showLoader();
|
||||
const body = {
|
||||
|
|
@ -233,6 +234,7 @@ async function getSearch() {
|
|||
});
|
||||
}
|
||||
|
||||
/** เก็บข้อมูลลงตัวแปร */
|
||||
function returnDetail(data: ResponsePreson) {
|
||||
formData.prefix = data.prefix;
|
||||
formData.firstname = data.firstName;
|
||||
|
|
@ -392,10 +394,6 @@ watch(
|
|||
}}
|
||||
</div>
|
||||
<div v-else-if="col.name == 'info'">
|
||||
<!-- <router-link
|
||||
target="_blank"
|
||||
:to="`/registry/${props.row.personId}`"
|
||||
> -->
|
||||
<q-btn
|
||||
dense
|
||||
flat
|
||||
|
|
@ -417,7 +415,6 @@ watch(
|
|||
</d-table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-12"><q-separator /></div> -->
|
||||
|
||||
<div class="col-3">
|
||||
<q-input
|
||||
|
|
|
|||
|
|
@ -1,14 +1,16 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, useAttrs, onMounted, watch } from "vue";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { ref, onMounted, watch } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useDisciplineDirectorDataStore } from "@/modules/11_discipline/store/DirectorStore";
|
||||
|
||||
import config from "@/app.config";
|
||||
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 { 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";
|
||||
|
||||
const $q = useQuasar();
|
||||
|
|
@ -44,22 +46,6 @@ const pagination = ref({
|
|||
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() {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -144,6 +130,23 @@ function onEdit(id: string, check: boolean) {
|
|||
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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -2,9 +2,10 @@
|
|||
import { onMounted, ref, reactive } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { tokenParsed } from "@/plugins/auth";
|
||||
import { useDisciplineSuspendStore } from "@/modules/11_discipline/store/SuspendStore";
|
||||
|
||||
|
|
@ -168,28 +169,6 @@ async function clickCancel() {
|
|||
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
|
||||
*/
|
||||
|
|
@ -274,60 +253,6 @@ onMounted(async () => {
|
|||
รายละเอียดการของ {{ data.name }}
|
||||
</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" />
|
||||
|
||||
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, computed, watch, onMounted } from "vue";
|
||||
import { ref, computed, onMounted } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { OpType } from "@/modules/05_placement/interface/response/Main";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
/** use */
|
||||
const $q = useQuasar();
|
||||
|
|
@ -16,7 +17,6 @@ const selected = ref<any>([]);
|
|||
const mixin = useCounterMixin();
|
||||
const {
|
||||
showLoader,
|
||||
success,
|
||||
messageError,
|
||||
dialogConfirm,
|
||||
hideLoader,
|
||||
|
|
|
|||
|
|
@ -2,13 +2,14 @@
|
|||
import { ref, onMounted, watch } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
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 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 { checkPermission } from "@/utils/permissions";
|
||||
|
|
@ -18,7 +19,6 @@ const dataStore = useDisciplineSuspendStore();
|
|||
const $q = useQuasar();
|
||||
const router = useRouter();
|
||||
const mixin = useCounterMixin();
|
||||
|
||||
const { messageError, showLoader, hideLoader, success } = mixin;
|
||||
|
||||
const modal = ref<boolean>(false);
|
||||
|
|
@ -126,13 +126,6 @@ const columns = ref<QTableProps["columns"]>([
|
|||
const openModal = () => (modal.value = true);
|
||||
const closeModal = () => (modal.value = false);
|
||||
|
||||
function resetFilter() {
|
||||
filterKeyword.value = "";
|
||||
filterKeyword2.value = "";
|
||||
filterRef.value.focus();
|
||||
getList();
|
||||
}
|
||||
|
||||
const currentPage = ref<number>(1);
|
||||
const maxPage = ref<number>(1);
|
||||
const page = ref<number>(1);
|
||||
|
|
@ -149,6 +142,13 @@ const pagination = ref({
|
|||
rowsPerPage: rowsPerPage.value,
|
||||
});
|
||||
|
||||
function resetFilter() {
|
||||
filterKeyword.value = "";
|
||||
filterKeyword2.value = "";
|
||||
filterRef.value.focus();
|
||||
getList();
|
||||
}
|
||||
|
||||
/** เปิด popup ส่งไปออกคำสั่ง โดย PENDING*/
|
||||
function openModalOrder() {
|
||||
openModal();
|
||||
|
|
@ -213,6 +213,10 @@ function onSubmit(data: dataType[], type: string) {
|
|||
});
|
||||
}
|
||||
|
||||
function filterFn() {
|
||||
getList();
|
||||
}
|
||||
|
||||
watch(
|
||||
() => currentPage.value,
|
||||
() => {
|
||||
|
|
@ -230,10 +234,6 @@ watch(
|
|||
}
|
||||
);
|
||||
|
||||
function filterFn() {
|
||||
getList();
|
||||
}
|
||||
|
||||
/** เรียกใช้งานเมื่อเริ่มหน้าเว็ป */
|
||||
onMounted(() => {
|
||||
getList();
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
<script setup lang="ts">
|
||||
import Form from "@/modules/11_discipline/components/8_AppealComplain/Form.vue";
|
||||
import config from "@/app.config";
|
||||
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 Form from "@/modules/11_discipline/components/8_AppealComplain/Form.vue";
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
|
||||
const { showLoader, messageError, hideLoader, dialogConfirm, success } = mixin;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive } from "vue";
|
||||
import Form from "@/modules/11_discipline/components/8_AppealComplain/Form.vue";
|
||||
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 type {
|
||||
|
|
@ -9,15 +12,15 @@ import type {
|
|||
HistoryStatusType,
|
||||
FileObType,
|
||||
} from "@/modules/11_discipline/interface/response/appealComplain";
|
||||
import config from "@/app.config";
|
||||
import http from "@/plugins/http";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import Form from "@/modules/11_discipline/components/8_AppealComplain/Form.vue";
|
||||
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
|
||||
const { showLoader, messageError, hideLoader, dialogConfirm, success } = mixin;
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const { showLoader, messageError, hideLoader, success } = mixin;
|
||||
|
||||
const id = ref<string>(route.params.id as string);
|
||||
const checkRoutePermission = ref<boolean>(route.name == "appealComplainDetail");
|
||||
const historyStatusOb = reactive<HistoryStatusType>({
|
||||
|
|
|
|||
|
|
@ -3,21 +3,21 @@ import { ref, reactive, watch, onMounted } from "vue";
|
|||
import { useQuasar } from "quasar";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
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 { useAppealComplainStore } from "@/modules/11_discipline/store/AppealComplainStore";
|
||||
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 {
|
||||
MyObjectAppealRef,
|
||||
HistoryStatusType,
|
||||
} 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 mainStore = useDisciplineMainStore();
|
||||
const router = useRouter();
|
||||
|
|
|
|||
|
|
@ -1,26 +1,25 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, watch, reactive } from "vue";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useRouter } from "vue-router";
|
||||
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 { RowList } from "@/modules/11_discipline/interface/response/appealComplain";
|
||||
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 config from "@/app.config";
|
||||
import http from "@/plugins/http";
|
||||
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
|
||||
const { showLoader, messageError, hideLoader, dialogConfirm } = mixin;
|
||||
const router = useRouter();
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, messageError, hideLoader, dialogConfirm } = mixin;
|
||||
|
||||
const modalStatusEdit = ref<boolean>(false);
|
||||
/** stoer */
|
||||
const dataStore = useAppealComplainStore();
|
||||
|
|
@ -29,9 +28,8 @@ const type = ref<DataOption[]>([
|
|||
{ id: "ALL", name: "ทั้งหมด" },
|
||||
...dataStore.typeOptions,
|
||||
]);
|
||||
const filterTable = ref<string>("");
|
||||
const filterKeyword = ref<string>("");
|
||||
|
||||
const filterKeyword = ref<string>("");
|
||||
const dataRow = ref<RowList[]>([]);
|
||||
const currentPage = ref<number>(1);
|
||||
const maxPage = ref<number>(1);
|
||||
|
|
|
|||
|
|
@ -1,20 +1,19 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch, reactive } from "vue";
|
||||
|
||||
import { useAppealComplainStore } from "@/modules/11_discipline/store/AppealComplainStore";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import type { HistoryStatusType } from "@/modules/11_discipline/interface/response/appealComplain";
|
||||
import type { QTableProps } from "quasar";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
const $q = useQuasar();
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { dialogConfirm, date2Thai } = mixin;
|
||||
const { date2Thai } = mixin;
|
||||
const dataStore = useAppealComplainStore();
|
||||
|
||||
const rows = ref<HistoryStatusType[]>([]);
|
||||
|
||||
/** หัวข้อที่เเสดงในตารางผู้ถูกร้องเรียน */
|
||||
const visibleColumns = ref<string[]>([
|
||||
"no",
|
||||
|
|
@ -22,6 +21,7 @@ const visibleColumns = ref<string[]>([
|
|||
"createdFullName",
|
||||
"createdAt",
|
||||
]);
|
||||
|
||||
/** หัวตารางผู้ถูกร้องเรียน */
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
|
|
@ -61,6 +61,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
|
||||
const props = defineProps({
|
||||
modal: {
|
||||
type: Boolean,
|
||||
|
|
|
|||
|
|
@ -1,30 +1,22 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, reactive, ref, useAttrs } from "vue";
|
||||
import router from "@/router";
|
||||
import { onMounted, ref } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import type { QTableProps } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { FormOrderPlacementMainData } from "@/modules/10_order/interface/request/Main";
|
||||
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 router from "@/router";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import { useOrderPlacementDataStore } from "@/modules/10_order/store";
|
||||
import { useOrderStore } from "@/modules/11_discipline/store/OrderStore";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useOrderPlacementDataStore } from "@/modules/10_order/store";
|
||||
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import type { 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";
|
||||
|
||||
const $q = useQuasar(); //ใช้ noti quasar
|
||||
const mixin = useCounterMixin();
|
||||
const DataStore = useOrderPlacementDataStore();
|
||||
const stroe = useOrderStore();
|
||||
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
|
||||
|
||||
|
|
@ -41,116 +33,11 @@ const commandCodes = ref<string[]>([
|
|||
"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 fiscalyearOP = ref<any>([{ id: 0, name: "ทั้งหมด" }]);
|
||||
const fiscalyearFilter1 = ref<any>([]);
|
||||
const fiscalYearFilter = async () => {
|
||||
async function fiscalYearFilter() {
|
||||
await http.get(config.API.yearOptionsOrder()).then((res) => {
|
||||
const response = res.data.result;
|
||||
fiscalyearOP.value = [{ id: 0, name: "ทั้งหมด" }];
|
||||
|
|
@ -166,7 +53,7 @@ const fiscalYearFilter = async () => {
|
|||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
// รายการข้อมูลประเภทคำสั่ง
|
||||
const OrderType = ref<string>("");
|
||||
|
|
@ -187,11 +74,13 @@ const addedOrderStatusValues: string[] = [];
|
|||
const filterKeyword = ref<string>("");
|
||||
const filterRef = ref<any>(null);
|
||||
|
||||
/** ล้างค่า input */
|
||||
function resetFilter() {
|
||||
filterKeyword.value = "";
|
||||
filterRef.value.focus();
|
||||
}
|
||||
|
||||
/** ประเภทครับสั่ง ฟิลเตอร์ */
|
||||
async function OrderTypeFilter() {
|
||||
await http
|
||||
.get(config.API.typeOrder())
|
||||
|
|
@ -217,6 +106,7 @@ async function searchFilterTable() {
|
|||
stroe.filterListOrder(OrderType.value, OrderStatus.value, fiscalyear.value);
|
||||
}
|
||||
|
||||
/** สถานะคำสั่ง ฟิลเตอร์ */
|
||||
async function OrderStatusFilter() {
|
||||
for (let data of stroe.mainData) {
|
||||
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 () => {
|
||||
await fiscalYearFilter();
|
||||
await OrderTypeFilter();
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted } from "vue";
|
||||
import router from "@/router";
|
||||
/** importType */
|
||||
import type { QTableProps } from "quasar";
|
||||
/** importStroe */
|
||||
|
||||
import router from "@/router";
|
||||
import { useOrderStore } from "@/modules/11_discipline/store/OrderStore";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
|
||||
const OrderStore = useOrderStore();
|
||||
|
||||
/** รับ props มาจากหน้าหลัก */
|
||||
|
|
@ -190,7 +190,7 @@ const pagination = ref({
|
|||
* @param id id ออกคำสั่ง
|
||||
* @param status status
|
||||
*/
|
||||
const redirectToPage = (id?: string, status?: string) => {
|
||||
function redirectToPage(id?: string, status?: string) {
|
||||
let step = 1;
|
||||
switch (status) {
|
||||
case "จัดทำร่างคำสั่ง":
|
||||
|
|
@ -207,13 +207,14 @@ const redirectToPage = (id?: string, status?: string) => {
|
|||
break;
|
||||
}
|
||||
router.push(`/discipline-order/detail/${id}?step=${step}`);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังชั่น redirect
|
||||
* @param id id ออกคำสั่ง
|
||||
* @param status status
|
||||
*/
|
||||
const redirectToDetailPage = (id?: string, status?: string) => {
|
||||
function redirectToDetailPage(id?: string, status?: string) {
|
||||
let step = 1;
|
||||
switch (status) {
|
||||
case "จัดทำร่างคำสั่ง":
|
||||
|
|
@ -230,7 +231,7 @@ const redirectToDetailPage = (id?: string, status?: string) => {
|
|||
break;
|
||||
}
|
||||
router.push(`/discipline-order-detail/detail/${id}?step=${step}`);
|
||||
};
|
||||
}
|
||||
|
||||
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
||||
onMounted(() => {
|
||||
|
|
|
|||
|
|
@ -1,16 +1,13 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, computed, watchEffect, watch, type PropType } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import type { QTableProps } from "quasar";
|
||||
|
||||
import type { directorType } from "@/modules/11_discipline/interface/index/Main";
|
||||
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
const $q = useQuasar();
|
||||
const selected = ref<directorType[]>([]);
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, success, messageError, dialogConfirm, hideLoader } = mixin;
|
||||
const currentPage = ref<number>(1);
|
||||
/** ค้นหาคอลัม */
|
||||
const visibleColumns2 = ref<string[]>([
|
||||
|
|
|
|||
|
|
@ -1,20 +1,14 @@
|
|||
<script setup lang="ts">
|
||||
import {
|
||||
ref,
|
||||
computed,
|
||||
watchEffect,
|
||||
watch,
|
||||
type PropType,
|
||||
onMounted,
|
||||
} from "vue";
|
||||
import { ref, watch } from "vue";
|
||||
import { QForm, useQuasar } from "quasar";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, success, messageError, dialogConfirm, hideLoader } = mixin;
|
||||
const { dialogConfirm } = mixin;
|
||||
|
||||
const props = defineProps({
|
||||
modal: Boolean,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch } from "vue";
|
||||
import { ref } from "vue";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useQuasar } from "quasar";
|
||||
|
|
|
|||
|
|
@ -72,6 +72,12 @@ interface FileLists {
|
|||
pathName: string; //link file
|
||||
}
|
||||
|
||||
interface HistoryResultCommand {
|
||||
commandSubject: string;
|
||||
createdAt: Date|null;
|
||||
lastUpdatedAt: Date|null;
|
||||
}
|
||||
|
||||
export type {
|
||||
DataOption,
|
||||
InvestigatefactsDataRowType,
|
||||
|
|
@ -82,4 +88,5 @@ export type {
|
|||
FileLists,
|
||||
DataOptioGroup,
|
||||
DataOptionYear,
|
||||
HistoryResultCommand
|
||||
};
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@ interface FormRef {
|
|||
firstname: object | null;
|
||||
lastname: object | null;
|
||||
position: object | null;
|
||||
// phone: object | null;
|
||||
// email: object | null;
|
||||
[key: string]: any;
|
||||
}
|
||||
interface typeOp {
|
||||
|
|
|
|||
|
|
@ -41,18 +41,6 @@ interface Director {
|
|||
prefix: string;
|
||||
total?: number;
|
||||
}
|
||||
// interface Persons {
|
||||
// personId: string; //id อ้างอิง profile
|
||||
// idcard: string; //เลขประจำตัวประชาชน
|
||||
// prefix: string; //คำนำหน้า
|
||||
// firstName: string; //ชื่อ
|
||||
// lastName: string; //นามสกุล
|
||||
// posNo: string; //ตำแหน่งเลขที่
|
||||
// position: string; //ตำแหน่ง
|
||||
// positionLevel: string; //ระดับ
|
||||
// salary: number; //เงินเดือน
|
||||
// organization: string; //สังกัด
|
||||
// }
|
||||
|
||||
interface FormData {
|
||||
respondentType: string;
|
||||
|
|
@ -93,37 +81,6 @@ interface ExtendHistoryObject {
|
|||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,18 +47,6 @@ interface ArrayPerson {
|
|||
phone: string;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -122,7 +122,6 @@ export const useAppealComplainStore = defineStore("AppealComplainStore", () => {
|
|||
visibleColumns,
|
||||
columns,
|
||||
fetchAppealComplain,
|
||||
// filterSelector,
|
||||
typeOptions,
|
||||
statusOptions,
|
||||
fiscalyearOP,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
|
||||
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 {
|
||||
|
|
@ -8,8 +10,9 @@ import type {
|
|||
DataListRow,
|
||||
ocListType,
|
||||
} from "@/modules/11_discipline/interface/response/complaint";
|
||||
|
||||
import type { QTableProps } from "quasar";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||
|
||||
const mainStore = useDisciplineMainStore();
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
import type { QTableProps } from "quasar";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
import type { Persons } from "@/modules/11_discipline/interface/request/disciplinary";
|
||||
import type {
|
||||
investigateDisDataRowType,
|
||||
DataOption,
|
||||
|
|
@ -9,8 +13,7 @@ import type {
|
|||
DataOptioGroup,
|
||||
DataNumberOption,
|
||||
} 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 { date2Thai } = mixin;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import type {
|
|||
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai } = mixin;
|
||||
|
||||
export const useOrderStore = defineStore("DisciplineOrder", () => {
|
||||
const columns = ref<QTableProps["columns"]>([]);
|
||||
const visibleColumns = ref<string[]>([]);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
|
||||
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
||||
|
||||
export const useReportDataStore = defineStore("DisciplineReport11", () => {
|
||||
const faultOp = ref<DataOption[]>();
|
||||
const ocSelectOp = ref<DataOption[]>();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
import type { QTableProps } from "quasar";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||
|
||||
import type {
|
||||
DataOption,
|
||||
directorType,
|
||||
|
|
@ -9,9 +13,7 @@ import type {
|
|||
DataResult,
|
||||
DataResultList,
|
||||
} from "@/modules/11_discipline/interface/response/result";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||
const mixin = useCounterMixin();
|
||||
const storeMain = useDisciplineMainStore();
|
||||
const { date2Thai } = mixin;
|
||||
|
|
@ -22,7 +24,6 @@ export const useDisciplineResultStore = defineStore(
|
|||
const tabMenu = ref<string>("result");
|
||||
const rows = ref<DataResultList[]>([]);
|
||||
const rows2 = ref<directorType[]>([]);
|
||||
const selected = ref<directorType[]>([]);
|
||||
|
||||
const complainantoptions = ref<DataOption[]>(
|
||||
storeMain.complainantoptionsMain
|
||||
|
|
|
|||
|
|
@ -1,12 +1,14 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
import type {
|
||||
listData,
|
||||
dataType,
|
||||
DataOption,
|
||||
} from "@/modules/11_discipline/interface/response/suspend";
|
||||
import type { QTableProps } from "quasar";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
export const useDisciplineSuspendStore = defineStore(
|
||||
"disciplineSuspendStore",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { ref } from "vue";
|
||||
import { defineStore } from "pinia";
|
||||
import type { QTableProps } from "quasar";
|
||||
import { ref } from "vue";
|
||||
|
||||
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
||||
import type { ArrayPersonAdd } from "@/modules/11_discipline/interface/response/investigate";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue