fix: ระบบพัฒนา เพิ่มปุ่มลบ/ระบบวินัย เพิ่ม ค้นหาขั้นสูง
This commit is contained in:
parent
9c5e958715
commit
852be66d2e
12 changed files with 1182 additions and 75 deletions
|
|
@ -7,7 +7,12 @@ const appeal = `${env.API_URI}/discipline/complaint_appeal`;
|
||||||
const disciplineReport = `${env.API_URI}/discipline/report`;
|
const disciplineReport = `${env.API_URI}/discipline/report`;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
directorList: (page: number, pageSize: number, keyword: string,path?:string) =>
|
directorList: (
|
||||||
|
page: number,
|
||||||
|
pageSize: number,
|
||||||
|
keyword: string,
|
||||||
|
path?: string
|
||||||
|
) =>
|
||||||
`${disciplineMain}/director/${path}?page=${page}&pageSize=${pageSize}&keyword=${keyword}`,
|
`${disciplineMain}/director/${path}?page=${page}&pageSize=${pageSize}&keyword=${keyword}`,
|
||||||
director: () => `${disciplineMain}/director`,
|
director: () => `${disciplineMain}/director`,
|
||||||
directorbyId: (id: string) => `${disciplineMain}/director/${id}`,
|
directorbyId: (id: string) => `${disciplineMain}/director/${id}`,
|
||||||
|
|
@ -18,33 +23,23 @@ export default {
|
||||||
/**ลบ ช่องทางการร้องเรียน
|
/**ลบ ช่องทางการร้องเรียน
|
||||||
* @param id type
|
* @param id type
|
||||||
*/
|
*/
|
||||||
complaintListOp: (page?:string) => `${disciplineMain}/complaint_Channel/${page}`,
|
complaintListOp: (page?: string) =>
|
||||||
|
`${disciplineMain}/complaint_Channel/${page}`,
|
||||||
complaintChannelbyId: (id: string) =>
|
complaintChannelbyId: (id: string) =>
|
||||||
`${disciplineMain}/complaint_Channel/${id}`,
|
`${disciplineMain}/complaint_Channel/${id}`,
|
||||||
complaintAdd: () => `${disciplineMain}/complaint`,
|
complaintAdd: () => `${disciplineMain}/complaint`,
|
||||||
complaintbyId: (id: string) => `${disciplineMain}/complaint/${id}`,
|
complaintbyId: (id: string) => `${disciplineMain}/complaint/${id}`,
|
||||||
complaintReject: (id: string) => `${disciplineMain}/complaint/reject/${id}`,
|
complaintReject: (id: string) => `${disciplineMain}/complaint/reject/${id}`,
|
||||||
complaintResume: (id: string) => `${disciplineMain}/complaint/resume/${id}`,
|
complaintResume: (id: string) => `${disciplineMain}/complaint/resume/${id}`,
|
||||||
complaintList: (
|
complaintList: () => `${disciplineMain}/complaint/advance-search`,
|
||||||
page: number,
|
|
||||||
pageSize: number,
|
|
||||||
keyword: string,
|
|
||||||
status: string
|
|
||||||
) =>
|
|
||||||
`${disciplineMain}/complaint?page=${page}&pageSize=${pageSize}&keyword=${keyword}&status=${status}`,
|
|
||||||
complaintFileUpload: (id: string) => `${disciplineMain}/complaint/file/${id}`,
|
complaintFileUpload: (id: string) => `${disciplineMain}/complaint/file/${id}`,
|
||||||
complaintFileDelete: (id: string, docId: string) =>
|
complaintFileDelete: (id: string, docId: string) =>
|
||||||
`${disciplineMain}/complaint/file/${id}/${docId}`,
|
`${disciplineMain}/complaint/file/${id}/${docId}`,
|
||||||
complaintApprove: (id: string) => `${disciplineMain}/complaint/approve/${id}`,
|
complaintApprove: (id: string) => `${disciplineMain}/complaint/approve/${id}`,
|
||||||
|
|
||||||
/** API สืบสวนข้อเท็จจริง*/
|
/** API สืบสวนข้อเท็จจริง*/
|
||||||
investigateMain: (
|
investigateMain: () => `${investigate}/advance-search`,
|
||||||
page: number,
|
|
||||||
pageSize: number,
|
|
||||||
keyword: string,
|
|
||||||
status: string
|
|
||||||
) =>
|
|
||||||
`${investigate}?page=${page}&pageSize=${pageSize}&keyword=${keyword}&status=${status}`,
|
|
||||||
investigateById: (id: string) => `${investigate}/${id}`,
|
investigateById: (id: string) => `${investigate}/${id}`,
|
||||||
|
|
||||||
investigateRelevantUploadFile: (id: string) =>
|
investigateRelevantUploadFile: (id: string) =>
|
||||||
|
|
@ -65,7 +60,7 @@ export default {
|
||||||
`${investigate}/director/${disciplineId}/${id}`,
|
`${investigate}/director/${disciplineId}/${id}`,
|
||||||
|
|
||||||
/** ระบบวินัยเรื่องสอบสวน */
|
/** ระบบวินัยเรื่องสอบสวน */
|
||||||
disciplineDisciplinary: () => `${discipline}`,
|
disciplineDisciplinary: () => `${discipline}/advance-search`,
|
||||||
disciplineDisciplinaryById: (id: string) => `${discipline}/${id}`,
|
disciplineDisciplinaryById: (id: string) => `${discipline}/${id}`,
|
||||||
disciplineInvestigateById: (id: string) => `${discipline}/investigate/${id}`,
|
disciplineInvestigateById: (id: string) => `${discipline}/investigate/${id}`,
|
||||||
disciplineComplaintsById: (id: string) => `${discipline}/complaint/${id}`,
|
disciplineComplaintsById: (id: string) => `${discipline}/complaint/${id}`,
|
||||||
|
|
@ -81,13 +76,18 @@ export default {
|
||||||
disciplinaryCalendar: () => `${discipline}/calendar`,
|
disciplinaryCalendar: () => `${discipline}/calendar`,
|
||||||
disciplinaryReport: () => `${discipline}/report`,
|
disciplinaryReport: () => `${discipline}/report`,
|
||||||
/** รายการสรุปผลการพิจารณาทางวินัย*/
|
/** รายการสรุปผลการพิจารณาทางวินัย*/
|
||||||
listResult: () => `${disciplineMain}/result`,
|
listResult: () => `${disciplineMain}/result/advance-search`,
|
||||||
listResultById: (id: string) => `${disciplineMain}/result/${id}`,
|
listResultById: (id: string) => `${disciplineMain}/result/${id}`,
|
||||||
disciplinaryEditDuty: (disciplineId: string, id: string) =>
|
disciplinaryEditDuty: (disciplineId: string, id: string) =>
|
||||||
`${discipline}/director/${disciplineId}/${id}`,
|
`${discipline}/director/${disciplineId}/${id}`,
|
||||||
|
|
||||||
/** ผู้ถูกพักราชการ */
|
/** ผู้ถูกพักราชการ */
|
||||||
suspendMain: (page: number, pageSize: number, keyword: string,type:string) =>
|
suspendMain: (
|
||||||
|
page: number,
|
||||||
|
pageSize: number,
|
||||||
|
keyword: string,
|
||||||
|
type: string
|
||||||
|
) =>
|
||||||
`${suspend}?page=${page}&pageSize=${pageSize}&keyword=${keyword}&profileType=${type}`,
|
`${suspend}?page=${page}&pageSize=${pageSize}&keyword=${keyword}&profileType=${type}`,
|
||||||
suspendById: (id: string) => `${suspend}/${id}`,
|
suspendById: (id: string) => `${suspend}/${id}`,
|
||||||
|
|
||||||
|
|
@ -122,11 +122,14 @@ export default {
|
||||||
historyOrderById: (id: string) =>
|
historyOrderById: (id: string) =>
|
||||||
`${env.API_URI}/order/history/discipline/${id}`,
|
`${env.API_URI}/order/history/discipline/${id}`,
|
||||||
|
|
||||||
complaintbyGetId: (id: string,page?:string) => `${disciplineMain}/complaint/${page}/${id}`,
|
complaintbyGetId: (id: string, page?: string) =>
|
||||||
investigateByGetId: (id: string,page?:string) => `${investigate}/${page}/${id}`,
|
`${disciplineMain}/complaint/${page}/${id}`,
|
||||||
disciplineDisciplinaryByGetId: (id: string,page?:string) => `${discipline}/${page}/${id}`,
|
investigateByGetId: (id: string, page?: string) =>
|
||||||
|
`${investigate}/${page}/${id}`,
|
||||||
|
disciplineDisciplinaryByGetId: (id: string, page?: string) =>
|
||||||
|
`${discipline}/${page}/${id}`,
|
||||||
|
|
||||||
disciplineReportByType: (type:string) => `${disciplineReport}/${type}`,
|
disciplineReportByType: (type: string) => `${disciplineReport}/${type}`,
|
||||||
|
|
||||||
disciplineFault:(id:string)=>`${disciplineMain}/result/summary/${id}`
|
disciplineFault: (id: string) => `${disciplineMain}/result/summary/${id}`,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,10 @@ import { useRouter } from "vue-router";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
// importStroe
|
// importStroe
|
||||||
|
import config from "@/app.config";
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
|
||||||
|
import { checkPermission } from "@/utils/permissions";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
||||||
|
|
||||||
|
|
@ -11,10 +15,7 @@ import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
||||||
|
|
||||||
// impoet Components
|
// impoet Components
|
||||||
import TableComplaint from "@/modules/11_discipline/components/1_Complaint/TableComplaint.vue";
|
import TableComplaint from "@/modules/11_discipline/components/1_Complaint/TableComplaint.vue";
|
||||||
|
import DialogSearchAdvanced from "@/modules/11_discipline/components/DialogSearchAdvanced.vue";
|
||||||
import config from "@/app.config";
|
|
||||||
import http from "@/plugins/http";
|
|
||||||
import { checkPermission } from "@/utils/permissions";
|
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
@ -41,17 +42,38 @@ const pagination = ref({
|
||||||
});
|
});
|
||||||
|
|
||||||
/** ดึงข้อมูล เรื่องร้องเรียน */
|
/** ดึงข้อมูล เรื่องร้องเรียน */
|
||||||
async function getList() {
|
async function getList(data?: any) {
|
||||||
|
const body = {
|
||||||
|
page: pagination.value.page,
|
||||||
|
pageSize: pagination.value.rowsPerPage,
|
||||||
|
keyword: filterKeyword.value.trim(),
|
||||||
|
status: statusFilter.value,
|
||||||
|
...(data && data.dateReceivedStart
|
||||||
|
? { dateReceivedStart: data.dateReceivedStart }
|
||||||
|
: {}),
|
||||||
|
...(data && data.dateReceivedEnd
|
||||||
|
? { dateReceivedEnd: data.dateReceivedEnd }
|
||||||
|
: {}),
|
||||||
|
...(data && data.respondentType
|
||||||
|
? { respondentType: data.respondentType }
|
||||||
|
: {}),
|
||||||
|
...(data && data.offenseDetails
|
||||||
|
? { offenseDetails: data.offenseDetails }
|
||||||
|
: {}),
|
||||||
|
...(data && data.levelConsideration
|
||||||
|
? { levelConsideration: data.levelConsideration }
|
||||||
|
: {}),
|
||||||
|
...(data && data.dateConsiderationStart
|
||||||
|
? { dateConsiderationStart: data.dateConsiderationStart }
|
||||||
|
: {}),
|
||||||
|
...(data && data.dateConsiderationEnd
|
||||||
|
? { dateConsiderationEnd: data.dateConsiderationEnd }
|
||||||
|
: {}),
|
||||||
|
};
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
||||||
await http
|
await http
|
||||||
.get(
|
.post(config.API.complaintList(), body)
|
||||||
config.API.complaintList(
|
|
||||||
pagination.value.page,
|
|
||||||
pagination.value.rowsPerPage,
|
|
||||||
filterKeyword.value.trim(),
|
|
||||||
statusFilter.value
|
|
||||||
)
|
|
||||||
)
|
|
||||||
//
|
//
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
totalList.value = Math.ceil(
|
totalList.value = Math.ceil(
|
||||||
|
|
@ -161,7 +183,7 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
|
<DialogSearchAdvanced :get-data="(value:any)=> getList(value)" />
|
||||||
<q-input
|
<q-input
|
||||||
for="#search"
|
for="#search"
|
||||||
standout
|
standout
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@ import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
|
|
||||||
|
import DialogSearchAdvanced from "@/modules/11_discipline/components/DialogSearchAdvanced.vue";
|
||||||
|
|
||||||
const $q = useQuasar(); //ใช้ noti quasar
|
const $q = useQuasar(); //ใช้ noti quasar
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const dataInvestigate = useInvestigateFactStore();
|
const dataInvestigate = useInvestigateFactStore();
|
||||||
|
|
@ -34,17 +36,40 @@ const pagination = ref({
|
||||||
const attrs = ref<any>(useAttrs());
|
const attrs = ref<any>(useAttrs());
|
||||||
|
|
||||||
/** ดึงข้อมูลบสวน */
|
/** ดึงข้อมูลบสวน */
|
||||||
async function getList() {
|
async function getList(data?: any) {
|
||||||
|
const body = {
|
||||||
|
page: pagination.value.page,
|
||||||
|
pageSize: pagination.value.rowsPerPage,
|
||||||
|
keyword: filterKeyword.value.trim(),
|
||||||
|
status: statusFilter.value,
|
||||||
|
...(data && data.respondentType
|
||||||
|
? { respondentType: data.respondentType }
|
||||||
|
: {}),
|
||||||
|
...(data && data.offenseDetails
|
||||||
|
? { offenseDetails: data.offenseDetails }
|
||||||
|
: {}),
|
||||||
|
...(data && data.investigationDetail
|
||||||
|
? { investigationDetail: data.investigationDetail }
|
||||||
|
: {}),
|
||||||
|
...(data && data.investigationDateStart
|
||||||
|
? { investigationDateStart: data.investigationDateStart }
|
||||||
|
: {}),
|
||||||
|
...(data && data.investigationDateEnd
|
||||||
|
? { investigationDateEnd: data.investigationDateEnd }
|
||||||
|
: {}),
|
||||||
|
...(data && data.dateReceivedStart
|
||||||
|
? { dateReceivedStart: data.dateReceivedStart }
|
||||||
|
: {}),
|
||||||
|
...(data && data.dateReceivedEnd
|
||||||
|
? { dateReceivedEnd: data.dateReceivedEnd }
|
||||||
|
: {}),
|
||||||
|
...(data && data.investigationStatusResult
|
||||||
|
? { investigationStatusResult: data.investigationStatusResult }
|
||||||
|
: {}),
|
||||||
|
};
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(
|
.post(config.API.investigateMain(), body)
|
||||||
config.API.investigateMain(
|
|
||||||
pagination.value.page,
|
|
||||||
pagination.value.rowsPerPage,
|
|
||||||
filterKeyword.value.trim(),
|
|
||||||
statusFilter.value
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
totalList.value = Math.ceil(
|
totalList.value = Math.ceil(
|
||||||
res.data.result.total / pagination.value.rowsPerPage
|
res.data.result.total / pagination.value.rowsPerPage
|
||||||
|
|
@ -159,7 +184,7 @@ onMounted(async () => {
|
||||||
</q-select>
|
</q-select>
|
||||||
|
|
||||||
<q-space />
|
<q-space />
|
||||||
|
<DialogSearchAdvanced :get-data="(value:any)=> getList(value)" />
|
||||||
<q-input
|
<q-input
|
||||||
for="#search"
|
for="#search"
|
||||||
standout
|
standout
|
||||||
|
|
|
||||||
|
|
@ -29,15 +29,40 @@ const { fetchList } = dataInvestigateDis;
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
|
|
||||||
const status = ref<string>("NEW");
|
const status = ref<string>("NEW");
|
||||||
async function fetchListDisciplinary() {
|
async function fetchListDisciplinary(data?: any) {
|
||||||
|
const body = {
|
||||||
|
page: pagination.value.page,
|
||||||
|
pageSize: pagination.value.rowsPerPage,
|
||||||
|
keyword: filter.value.trim(),
|
||||||
|
status: status.value,
|
||||||
|
...(data && data.respondentType
|
||||||
|
? { respondentType: data.respondentType }
|
||||||
|
: {}),
|
||||||
|
...(data && data.offenseDetails
|
||||||
|
? { offenseDetails: data.offenseDetails }
|
||||||
|
: {}),
|
||||||
|
...(data && data.disciplinaryFaultLevel
|
||||||
|
? { disciplinaryFaultLevel: data.disciplinaryFaultLevel }
|
||||||
|
: {}),
|
||||||
|
...(data && data.disciplinaryCaseFault
|
||||||
|
? { disciplinaryCaseFault: data.disciplinaryCaseFault }
|
||||||
|
: {}),
|
||||||
|
...(data && data.disciplinaryDateStart
|
||||||
|
? { disciplinaryDateStart: data.disciplinaryDateStart }
|
||||||
|
: {}),
|
||||||
|
...(data && data.disciplinaryDateEnd
|
||||||
|
? { disciplinaryDateEnd: data.disciplinaryDateEnd }
|
||||||
|
: {}),
|
||||||
|
...(data && data.dateReceivedStart
|
||||||
|
? { dateReceivedStart: data.dateReceivedStart }
|
||||||
|
: {}),
|
||||||
|
...(data && data.dateReceivedEnd
|
||||||
|
? { dateReceivedEnd: data.dateReceivedEnd }
|
||||||
|
: {}),
|
||||||
|
};
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(
|
.post(config.API.disciplineDisciplinary(), body)
|
||||||
config.API.disciplineDisciplinary() +
|
|
||||||
`?page=${pagination.value.page}&pageSize=${
|
|
||||||
pagination.value.rowsPerPage
|
|
||||||
}&keyword=${filter.value.trim()}&status=${status.value}`
|
|
||||||
)
|
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result.data;
|
const data = res.data.result.data;
|
||||||
totalList.value = Math.ceil(
|
totalList.value = Math.ceil(
|
||||||
|
|
@ -74,9 +99,9 @@ function filterStatus(statusReturn: string) {
|
||||||
getSearch();
|
getSearch();
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSearch() {
|
function getSearch(data?:any) {
|
||||||
pagination.value.page = 1;
|
pagination.value.page = 1;
|
||||||
fetchListDisciplinary();
|
fetchListDisciplinary(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import { ref, useAttrs, watch } from "vue";
|
||||||
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
|
|
||||||
|
import DialogSearchAdvanced from "@/modules/11_discipline/components/DialogSearchAdvanced.vue";
|
||||||
|
|
||||||
const total = defineModel<number>("total", { required: true });
|
const total = defineModel<number>("total", { required: true });
|
||||||
const totalList = defineModel<number>("totalList", { required: true });
|
const totalList = defineModel<number>("totalList", { required: true });
|
||||||
const pagination = defineModel<any>("pagination", { required: true });
|
const pagination = defineModel<any>("pagination", { required: true });
|
||||||
|
|
@ -132,7 +134,7 @@ function updatePagination(newPagination: any) {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="q-pb-sm row q-col-gutter-sm">
|
<div class="q-pb-sm row q-col-gutter-sm items-center">
|
||||||
<q-select
|
<q-select
|
||||||
v-model="statusFilter"
|
v-model="statusFilter"
|
||||||
label="สถานะ"
|
label="สถานะ"
|
||||||
|
|
@ -169,6 +171,7 @@ function updatePagination(newPagination: any) {
|
||||||
|
|
||||||
<q-space />
|
<q-space />
|
||||||
<!-- ค้นหาข้อความใน table -->
|
<!-- ค้นหาข้อความใน table -->
|
||||||
|
<DialogSearchAdvanced :get-data="(value:any)=> props.getSearch?.(value)" />
|
||||||
<q-input
|
<q-input
|
||||||
standout
|
standout
|
||||||
dense
|
dense
|
||||||
|
|
@ -176,13 +179,20 @@ function updatePagination(newPagination: any) {
|
||||||
ref="filterRef"
|
ref="filterRef"
|
||||||
@update:model-value="updateInput"
|
@update:model-value="updateInput"
|
||||||
outlined
|
outlined
|
||||||
placeholder="ค้นหาเรื่องร้องเรียน"
|
placeholder="ค้นหา"
|
||||||
style="max-width: 200px"
|
style="max-width: 200px"
|
||||||
@keydown.enter.prevent="filterFn"
|
@keydown.enter.prevent="filterFn"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
</template>
|
</template>
|
||||||
|
<q-tooltip
|
||||||
|
transition-show="scale"
|
||||||
|
transition-hide="scale"
|
||||||
|
class="text-body2"
|
||||||
|
>หมายเหตุ: ค้นหาจากเรื่องร้องเรียน
|
||||||
|
ระดับโทษความผิดหรือกรณีความผิด</q-tooltip
|
||||||
|
>
|
||||||
</q-input>
|
</q-input>
|
||||||
<!-- แสดงคอลัมน์ใน table -->
|
<!-- แสดงคอลัมน์ใน table -->
|
||||||
<q-select
|
<q-select
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import type {
|
||||||
FormRef,
|
FormRef,
|
||||||
DataOption,
|
DataOption,
|
||||||
FaultTypeOption,
|
FaultTypeOption,
|
||||||
} from "@/modules/11_discipline/interface/request/Result";
|
} from "@/modules/11_discipline/interface/request/result";
|
||||||
|
|
||||||
import DialogHistory from "@/modules/11_discipline/components/4_Result/DialogHistory.vue";
|
import DialogHistory from "@/modules/11_discipline/components/4_Result/DialogHistory.vue";
|
||||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||||
|
|
|
||||||
|
|
@ -31,13 +31,42 @@ const pagination = ref({
|
||||||
});
|
});
|
||||||
|
|
||||||
/** function เรียกรายการสรุปผลการพิจารณาทางวินัย*/
|
/** function เรียกรายการสรุปผลการพิจารณาทางวินัย*/
|
||||||
async function fetchListResult() {
|
async function fetchListResult(data?: any) {
|
||||||
|
const body = {
|
||||||
|
page: pagination.value.page,
|
||||||
|
pageSize: pagination.value.rowsPerPage,
|
||||||
|
keyword: filter.value.trim(),
|
||||||
|
status: status.value,
|
||||||
|
...(data && data.respondentType
|
||||||
|
? { respondentType: data.respondentType }
|
||||||
|
: {}),
|
||||||
|
...(data && data.offenseDetails
|
||||||
|
? { offenseDetails: data.offenseDetails }
|
||||||
|
: {}),
|
||||||
|
...(data && data.disciplinaryFaultLevel
|
||||||
|
? { disciplinaryFaultLevel: data.disciplinaryFaultLevel }
|
||||||
|
: {}),
|
||||||
|
...(data && data.disciplinaryCaseFault
|
||||||
|
? { disciplinaryCaseFault: data.disciplinaryCaseFault }
|
||||||
|
: {}),
|
||||||
|
...(data && data.disciplinaryDateStart
|
||||||
|
? { disciplinaryDateStart: data.disciplinaryDateStart }
|
||||||
|
: {}),
|
||||||
|
...(data && data.disciplinaryDateEnd
|
||||||
|
? { disciplinaryDateEnd: data.disciplinaryDateEnd }
|
||||||
|
: {}),
|
||||||
|
...(data && data.resultDisciplineType
|
||||||
|
? { resultDisciplineType: data.resultDisciplineType }
|
||||||
|
: {}),
|
||||||
|
...(data && data.resultTitleType
|
||||||
|
? { resultTitleType: data.resultTitleType }
|
||||||
|
: {}),
|
||||||
|
...(data && data.resultOc ? { resultOc: data.resultOc } : {}),
|
||||||
|
...(data && data.resultYear ? { resultYear: data.resultYear } : {}),
|
||||||
|
};
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(
|
.post(config.API.listResult(), body)
|
||||||
config.API.listResult() +
|
|
||||||
`?page=${pagination.value.page}&pageSize=${pagination.value.rowsPerPage}&keyword=${filter.value.trim()}&status=${status.value}`
|
|
||||||
)
|
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result.data;
|
const data = res.data.result.data;
|
||||||
totalList.value = Math.ceil(
|
totalList.value = Math.ceil(
|
||||||
|
|
@ -74,9 +103,9 @@ function filterStatus(statusReturn: string) {
|
||||||
getSearch();
|
getSearch();
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSearch() {
|
function getSearch(data?: any) {
|
||||||
pagination.value.page = 1;
|
pagination.value.page = 1;
|
||||||
fetchListResult();
|
fetchListResult(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import { ref, useAttrs, watch } from "vue";
|
||||||
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
|
|
||||||
|
import DialogSearchAdvanced from "@/modules/11_discipline/components/DialogSearchAdvanced.vue";
|
||||||
|
|
||||||
const total = defineModel<number>("total", { required: true });
|
const total = defineModel<number>("total", { required: true });
|
||||||
const totalList = defineModel<number>("totalList", { required: true });
|
const totalList = defineModel<number>("totalList", { required: true });
|
||||||
const pagination = defineModel<any>("pagination", { required: true });
|
const pagination = defineModel<any>("pagination", { required: true });
|
||||||
|
|
@ -111,7 +113,7 @@ function updatePagination(newPagination: any) {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="q-pb-sm row q-col-gutter-sm">
|
<div class="q-pb-sm row q-col-gutter-sm items-center">
|
||||||
<div class="q-gutter-sm" v-if="nornmalData == true"></div>
|
<div class="q-gutter-sm" v-if="nornmalData == true"></div>
|
||||||
|
|
||||||
<q-select
|
<q-select
|
||||||
|
|
@ -147,6 +149,7 @@ function updatePagination(newPagination: any) {
|
||||||
</q-select>
|
</q-select>
|
||||||
|
|
||||||
<q-space />
|
<q-space />
|
||||||
|
<DialogSearchAdvanced :get-data="(value:any)=> props.getSearch?.(value)" />
|
||||||
<q-input
|
<q-input
|
||||||
standout
|
standout
|
||||||
dense
|
dense
|
||||||
|
|
@ -155,18 +158,20 @@ function updatePagination(newPagination: any) {
|
||||||
@keydown.enter.prevent="filterFn"
|
@keydown.enter.prevent="filterFn"
|
||||||
@update:model-value="updateInput"
|
@update:model-value="updateInput"
|
||||||
outlined
|
outlined
|
||||||
placeholder="ค้นหาเรื่องร้องเรียน"
|
placeholder="ค้นหา"
|
||||||
style="max-width: 200px"
|
style="max-width: 200px"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
</template>
|
</template>
|
||||||
<q-tooltip
|
<q-tooltip
|
||||||
|
anchor="bottom left"
|
||||||
transition-show="scale"
|
transition-show="scale"
|
||||||
transition-hide="scale"
|
transition-hide="scale"
|
||||||
class="text-body2"
|
class="text-body2"
|
||||||
>หมายเหตุ: ค้นหาเรื่องร้องเรียน, ประเภทของเรื่อง,
|
>
|
||||||
หน่วยงานหรือปีงบประมาณ</q-tooltip
|
หมายเหตุ: ค้นหาจากเรื่องร้องเรียน ประเภทวินัย ประเภทของเรื่อง
|
||||||
|
หน่วนงาน/ส่วนราชการ หรือปีงบประมาณ</q-tooltip
|
||||||
>
|
>
|
||||||
</q-input>
|
</q-input>
|
||||||
<q-select
|
<q-select
|
||||||
|
|
|
||||||
939
src/modules/11_discipline/components/DialogSearchAdvanced.vue
Normal file
939
src/modules/11_discipline/components/DialogSearchAdvanced.vue
Normal file
|
|
@ -0,0 +1,939 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, reactive } from "vue";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
||||||
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
||||||
|
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
||||||
|
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
||||||
|
|
||||||
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
const mixin = useCounterMixin();
|
||||||
|
const { dateThaiRange, convertDateToAPI } = mixin;
|
||||||
|
const store = useDisciplineMainStore();
|
||||||
|
const complainstStore = useComplainstDataStore();
|
||||||
|
const investigateStore = useInvestigateFactStore();
|
||||||
|
const InvestigateDisStore = useInvestigateDisStore();
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
getData: Function,
|
||||||
|
});
|
||||||
|
const modal = ref<boolean>(false);
|
||||||
|
|
||||||
|
/** เปิด popup ค้นหาขั้นสูง */
|
||||||
|
function onSearch() {
|
||||||
|
modal.value = true;
|
||||||
|
|
||||||
|
formComplaint.dateReceived = null;
|
||||||
|
formComplaint.respondentType = "";
|
||||||
|
formComplaint.offenseDetails = "";
|
||||||
|
formComplaint.levelConsideration = "";
|
||||||
|
formComplaint.dateConsideration = null;
|
||||||
|
|
||||||
|
formInvestigateFacts.respondentType = "";
|
||||||
|
formInvestigateFacts.offenseDetails = "";
|
||||||
|
formInvestigateFacts.investigationDetail = "";
|
||||||
|
formInvestigateFacts.investigationDate = null;
|
||||||
|
formInvestigateFacts.dateReceived = null;
|
||||||
|
formInvestigateFacts.investigationStatusResult = "";
|
||||||
|
|
||||||
|
formInvestigateDisciplinary.respondentType = "";
|
||||||
|
formInvestigateDisciplinary.offenseDetails = "";
|
||||||
|
formInvestigateDisciplinary.disciplinaryFaultLevel = "";
|
||||||
|
formInvestigateDisciplinary.disciplinaryCaseFault = "";
|
||||||
|
formInvestigateDisciplinary.disciplinaryDate = null;
|
||||||
|
formInvestigateDisciplinary.dateReceived = null;
|
||||||
|
|
||||||
|
formResult.respondentType = "";
|
||||||
|
formResult.offenseDetails = "";
|
||||||
|
formResult.disciplinaryFaultLevel = "";
|
||||||
|
formResult.disciplinaryCaseFault = "";
|
||||||
|
formResult.disciplinaryDate = null;
|
||||||
|
formResult.resultDisciplineType = "";
|
||||||
|
formResult.resultTitleType = "";
|
||||||
|
formResult.resultOc = "";
|
||||||
|
formResult.resultYear = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** ปิด popup ค้นหาขั้นสูง */
|
||||||
|
function onClose() {
|
||||||
|
modal.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** ตัวแปร ค้นหาขั้นสูง เรื่องร้องเรียน*/
|
||||||
|
const formComplaint = reactive<{
|
||||||
|
dateReceived: [Date, Date] | null;
|
||||||
|
respondentType: string;
|
||||||
|
offenseDetails: string;
|
||||||
|
levelConsideration: string;
|
||||||
|
dateConsideration: [Date, Date] | null;
|
||||||
|
}>({
|
||||||
|
dateReceived: null, // วันที่รับเรื่องเริ่มต้น[0] - สิ้นสุด[1]
|
||||||
|
respondentType: "", // ผู้ถูกร้องเรียน
|
||||||
|
offenseDetails: "", // ลักษณะความผิด
|
||||||
|
levelConsideration: "", // ระดับการพิจารณา
|
||||||
|
dateConsideration: null, // วันที่เริ่มต้น[0] - สิ้นสุดการพิจารณา[1]
|
||||||
|
});
|
||||||
|
|
||||||
|
const formInvestigateFacts = reactive<{
|
||||||
|
respondentType: string;
|
||||||
|
offenseDetails: string;
|
||||||
|
investigationDetail: string;
|
||||||
|
investigationDate: [Date, Date] | null;
|
||||||
|
dateReceived: [Date, Date] | null;
|
||||||
|
investigationStatusResult: string;
|
||||||
|
}>({
|
||||||
|
respondentType: "", // ผู้ถูกสืบสวน
|
||||||
|
offenseDetails: "", // ลักษณะความผิด
|
||||||
|
investigationDetail: "", // ลักษณะการสืบสวน
|
||||||
|
investigationDate: null, // วันที่สืบสวนเริ่มต้น[0] - สิ้นสุด[1]
|
||||||
|
dateReceived: null, // วันที่รับเรื่องเริ่มต้น[0] - สิ้นสุด[1]
|
||||||
|
investigationStatusResult: "", // ผลการสืบสวน
|
||||||
|
});
|
||||||
|
|
||||||
|
const formInvestigateDisciplinary = reactive<{
|
||||||
|
respondentType: string;
|
||||||
|
offenseDetails: string;
|
||||||
|
disciplinaryFaultLevel: string;
|
||||||
|
disciplinaryCaseFault: string;
|
||||||
|
disciplinaryDate: [Date, Date] | null;
|
||||||
|
dateReceived: [Date, Date] | null;
|
||||||
|
}>({
|
||||||
|
respondentType: "", // ผู้ถูกสอบสวน
|
||||||
|
offenseDetails: "", // ลักษณะความผิด
|
||||||
|
disciplinaryFaultLevel: "", // ระดับโทษความผิด
|
||||||
|
disciplinaryCaseFault: "", // กรณีความผิด
|
||||||
|
disciplinaryDate: null, // วันที่สอบสวนเริ่มต้น[0]-สิ้นสุด[1]
|
||||||
|
dateReceived: null, // วันที่รับเรื่องเริ่มต้น[0]-สิ้นสุด[1]
|
||||||
|
});
|
||||||
|
|
||||||
|
const formResult = reactive<{
|
||||||
|
respondentType: string;
|
||||||
|
offenseDetails: string;
|
||||||
|
disciplinaryFaultLevel: string;
|
||||||
|
disciplinaryCaseFault: string;
|
||||||
|
disciplinaryDate: [Date, Date] | null;
|
||||||
|
resultDisciplineType: string;
|
||||||
|
resultTitleType: string;
|
||||||
|
resultOc: string;
|
||||||
|
resultYear: number | null;
|
||||||
|
}>({
|
||||||
|
respondentType: "", // ผู้ถูกสอบสวน
|
||||||
|
offenseDetails: "", // ลักษณะความผิด
|
||||||
|
disciplinaryFaultLevel: "", // ระดับโทษความผิด
|
||||||
|
disciplinaryCaseFault: "", // กรณีความผิด
|
||||||
|
disciplinaryDate: null, // วันที่สอบสวนเริ่มต้น[0]-สิ้นสุด[1]
|
||||||
|
resultDisciplineType: "", // ประเภทวินัย input
|
||||||
|
resultTitleType: "", // ประเภทของเรื่อง
|
||||||
|
resultOc: "", // หน่วยงาน/ส่วนราชการ
|
||||||
|
resultYear: null, // ปีงบประมาณ
|
||||||
|
});
|
||||||
|
|
||||||
|
/** fn ค้นหาขั้นสูง */
|
||||||
|
function complaintBody() {
|
||||||
|
return {
|
||||||
|
dateReceivedStart: formComplaint.dateReceived?.[0]
|
||||||
|
? convertDateToAPI(formComplaint.dateReceived[0])
|
||||||
|
: null,
|
||||||
|
dateReceivedEnd: formComplaint.dateReceived?.[1]
|
||||||
|
? convertDateToAPI(formComplaint.dateReceived[1])
|
||||||
|
: null,
|
||||||
|
respondentType: formComplaint.respondentType,
|
||||||
|
offenseDetails: formComplaint.offenseDetails,
|
||||||
|
levelConsideration: formComplaint.levelConsideration,
|
||||||
|
dateConsiderationStart: formComplaint.dateConsideration?.[0]
|
||||||
|
? convertDateToAPI(formComplaint.dateConsideration[0])
|
||||||
|
: null,
|
||||||
|
dateConsiderationEnd: formComplaint.dateConsideration?.[1]
|
||||||
|
? convertDateToAPI(formComplaint.dateConsideration[1])
|
||||||
|
: null,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function investigateFactsBody() {
|
||||||
|
return {
|
||||||
|
respondentType: formInvestigateFacts.respondentType,
|
||||||
|
offenseDetails: formInvestigateFacts.offenseDetails,
|
||||||
|
investigationDetail: formInvestigateFacts.investigationDetail,
|
||||||
|
investigationDateStart: formInvestigateFacts.investigationDate?.[0]
|
||||||
|
? convertDateToAPI(formInvestigateFacts.investigationDate[0])
|
||||||
|
: null,
|
||||||
|
investigationDateEnd: formInvestigateFacts.investigationDate?.[1]
|
||||||
|
? convertDateToAPI(formInvestigateFacts.investigationDate[1])
|
||||||
|
: null,
|
||||||
|
dateReceivedStart: formInvestigateFacts.dateReceived?.[0]
|
||||||
|
? convertDateToAPI(formInvestigateFacts.dateReceived[0])
|
||||||
|
: null,
|
||||||
|
dateReceivedEnd: formInvestigateFacts.dateReceived?.[1]
|
||||||
|
? convertDateToAPI(formInvestigateFacts.dateReceived[1])
|
||||||
|
: null,
|
||||||
|
investigationStatusResult: formInvestigateFacts.investigationStatusResult,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function disciplinaryBody() {
|
||||||
|
return {
|
||||||
|
respondentType: formInvestigateDisciplinary.respondentType,
|
||||||
|
offenseDetails: formInvestigateDisciplinary.offenseDetails,
|
||||||
|
disciplinaryFaultLevel: formInvestigateDisciplinary.disciplinaryFaultLevel,
|
||||||
|
disciplinaryCaseFault:
|
||||||
|
formInvestigateDisciplinary.disciplinaryCaseFault.trim(),
|
||||||
|
disciplinaryDateStart: formInvestigateDisciplinary.disciplinaryDate?.[0]
|
||||||
|
? convertDateToAPI(formInvestigateDisciplinary.disciplinaryDate[0])
|
||||||
|
: null,
|
||||||
|
disciplinaryDateEnd: formInvestigateDisciplinary.disciplinaryDate?.[1]
|
||||||
|
? convertDateToAPI(formInvestigateDisciplinary.disciplinaryDate[1])
|
||||||
|
: null,
|
||||||
|
dateReceivedStart: formInvestigateDisciplinary.dateReceived?.[0]
|
||||||
|
? convertDateToAPI(formInvestigateDisciplinary.dateReceived[0])
|
||||||
|
: null,
|
||||||
|
dateReceivedEnd: formInvestigateDisciplinary.dateReceived?.[1]
|
||||||
|
? convertDateToAPI(formInvestigateDisciplinary.dateReceived[1])
|
||||||
|
: null,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function resultBody() {
|
||||||
|
return {
|
||||||
|
respondentType: formResult.respondentType,
|
||||||
|
offenseDetails: formResult.offenseDetails,
|
||||||
|
disciplinaryFaultLevel: formResult.disciplinaryFaultLevel,
|
||||||
|
disciplinaryCaseFault: formResult.disciplinaryCaseFault.trim(),
|
||||||
|
disciplinaryDateStart: formResult.disciplinaryDate?.[0]
|
||||||
|
? convertDateToAPI(formResult.disciplinaryDate[0])
|
||||||
|
: null,
|
||||||
|
disciplinaryDateEnd: formResult.disciplinaryDate?.[1]
|
||||||
|
? convertDateToAPI(formResult.disciplinaryDate[1])
|
||||||
|
: null,
|
||||||
|
resultDisciplineType: formResult.resultDisciplineType.trim(),
|
||||||
|
resultTitleType: formResult.resultTitleType.trim(),
|
||||||
|
resultOc: formResult.resultOc.trim(),
|
||||||
|
resultYear: formResult.resultYear,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function fnSearch() {
|
||||||
|
let body: any;
|
||||||
|
|
||||||
|
switch (route.name) {
|
||||||
|
case "disciplineComplaints":
|
||||||
|
body = complaintBody();
|
||||||
|
break;
|
||||||
|
case "disciplineInvestigatefacts":
|
||||||
|
body = investigateFactsBody();
|
||||||
|
break;
|
||||||
|
case "disciplineDisciplinary":
|
||||||
|
body = disciplinaryBody();
|
||||||
|
break;
|
||||||
|
case "disciplineResult":
|
||||||
|
body = resultBody();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
props.getData?.(body);
|
||||||
|
onClose();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<q-btn
|
||||||
|
size="12px"
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
color="blue"
|
||||||
|
icon="mdi-filter-variant"
|
||||||
|
@click="onSearch"
|
||||||
|
>
|
||||||
|
<q-tooltip>ค้นหาขั้นสูง</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</div>
|
||||||
|
<q-dialog v-model="modal" persistent>
|
||||||
|
<q-card class="col-12" style="width: 400px">
|
||||||
|
<q-form greedy @submit.prevent @validation-success="fnSearch">
|
||||||
|
<DialogHeader :tittle="'ค้นหาขั้นสูง'" :close="onClose" />
|
||||||
|
<q-separator />
|
||||||
|
<q-card-section>
|
||||||
|
<div
|
||||||
|
v-if="route.name == 'disciplineComplaints'"
|
||||||
|
class="row q-col-gutter-sm"
|
||||||
|
>
|
||||||
|
<div class="col-12">
|
||||||
|
<datepicker
|
||||||
|
v-model="formComplaint.dateReceived"
|
||||||
|
:locale="'th'"
|
||||||
|
autoApply
|
||||||
|
borderless
|
||||||
|
range
|
||||||
|
:enableTimePicker="false"
|
||||||
|
week-start="0"
|
||||||
|
class=""
|
||||||
|
menu-class-name="modalfix"
|
||||||
|
>
|
||||||
|
<template #year="{ year }">
|
||||||
|
{{ year + 543 }}
|
||||||
|
</template>
|
||||||
|
<template #year-overlay-value="{ value }">
|
||||||
|
{{ parseInt(value + 543) }}
|
||||||
|
</template>
|
||||||
|
<template #trigger>
|
||||||
|
<q-input
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
class="full-width datepicker"
|
||||||
|
:model-value="
|
||||||
|
formComplaint.dateReceived != null
|
||||||
|
? dateThaiRange(formComplaint.dateReceived)
|
||||||
|
: null
|
||||||
|
"
|
||||||
|
:label="`${'วันที่รับเรื่องเริ่มต้น-สิ้นสุด'}`"
|
||||||
|
>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon
|
||||||
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
style="color: var(--q-primary)"
|
||||||
|
>
|
||||||
|
</q-icon>
|
||||||
|
</template>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon
|
||||||
|
v-if="formComplaint.dateReceived !== null"
|
||||||
|
name="clear"
|
||||||
|
class="cursor-pointer"
|
||||||
|
@click.prevent.stop="formComplaint.dateReceived = null"
|
||||||
|
>
|
||||||
|
</q-icon>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</template>
|
||||||
|
</datepicker>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<q-select
|
||||||
|
v-model="formComplaint.respondentType"
|
||||||
|
:options="store.complainantoptionsMain"
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
map-options
|
||||||
|
emit-value
|
||||||
|
clearable
|
||||||
|
label="ผู้ถูกร้องเรียน"
|
||||||
|
>
|
||||||
|
</q-select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<q-select
|
||||||
|
v-model="formComplaint.offenseDetails"
|
||||||
|
:options="store.offenseDetailstOptions"
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
map-options
|
||||||
|
emit-value
|
||||||
|
clearable
|
||||||
|
label="ลักษณะความผิด"
|
||||||
|
>
|
||||||
|
</q-select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<q-select
|
||||||
|
v-model="formComplaint.levelConsideration"
|
||||||
|
:options="complainstStore.levelConsiderationtOptions"
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
map-options
|
||||||
|
emit-value
|
||||||
|
clearable
|
||||||
|
label="ระดับการพิจารณา"
|
||||||
|
>
|
||||||
|
</q-select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<datepicker
|
||||||
|
v-model="formComplaint.dateConsideration"
|
||||||
|
:locale="'th'"
|
||||||
|
autoApply
|
||||||
|
borderless
|
||||||
|
range
|
||||||
|
:enableTimePicker="false"
|
||||||
|
week-start="0"
|
||||||
|
menu-class-name="modalfix"
|
||||||
|
>
|
||||||
|
<template #year="{ year }">
|
||||||
|
{{ year + 543 }}
|
||||||
|
</template>
|
||||||
|
<template #year-overlay-value="{ value }">
|
||||||
|
{{ parseInt(value + 543) }}
|
||||||
|
</template>
|
||||||
|
<template #trigger>
|
||||||
|
<q-input
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
class="full-width datepicker"
|
||||||
|
:model-value="
|
||||||
|
formComplaint.dateConsideration != null
|
||||||
|
? dateThaiRange(formComplaint.dateConsideration)
|
||||||
|
: null
|
||||||
|
"
|
||||||
|
:label="`${'วันที่เริ่มต้น-สิ้นสุดการพิจารณา'}`"
|
||||||
|
>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon
|
||||||
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
style="color: var(--q-primary)"
|
||||||
|
>
|
||||||
|
</q-icon>
|
||||||
|
</template>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon
|
||||||
|
v-if="formComplaint.dateConsideration !== null"
|
||||||
|
name="clear"
|
||||||
|
class="cursor-pointer"
|
||||||
|
@click.prevent.stop="
|
||||||
|
formComplaint.dateConsideration = null
|
||||||
|
"
|
||||||
|
>
|
||||||
|
</q-icon>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</template>
|
||||||
|
</datepicker>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
v-if="route.name == 'disciplineInvestigatefacts'"
|
||||||
|
class="row q-col-gutter-sm"
|
||||||
|
>
|
||||||
|
<div class="col-12">
|
||||||
|
<q-select
|
||||||
|
v-model="formInvestigateFacts.respondentType"
|
||||||
|
:options="store.complainantoptionsMain"
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
map-options
|
||||||
|
emit-value
|
||||||
|
clearable
|
||||||
|
label="ผู้ถูกสืบสวน"
|
||||||
|
>
|
||||||
|
</q-select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<q-select
|
||||||
|
v-model="formInvestigateFacts.offenseDetails"
|
||||||
|
:options="store.offenseDetailstOptions"
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
map-options
|
||||||
|
emit-value
|
||||||
|
clearable
|
||||||
|
label="ลักษณะความผิด"
|
||||||
|
>
|
||||||
|
</q-select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<q-select
|
||||||
|
v-model="formInvestigateFacts.investigationDetail"
|
||||||
|
:options="investigateStore.investigationDetailOp"
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
map-options
|
||||||
|
emit-value
|
||||||
|
clearable
|
||||||
|
label="ลักษณะการสืบสวน"
|
||||||
|
>
|
||||||
|
</q-select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12">
|
||||||
|
<datepicker
|
||||||
|
v-model="formInvestigateFacts.investigationDate"
|
||||||
|
:locale="'th'"
|
||||||
|
autoApply
|
||||||
|
borderless
|
||||||
|
range
|
||||||
|
:enableTimePicker="false"
|
||||||
|
week-start="0"
|
||||||
|
menu-class-name="modalfix"
|
||||||
|
>
|
||||||
|
<template #year="{ year }">
|
||||||
|
{{ year + 543 }}
|
||||||
|
</template>
|
||||||
|
<template #year-overlay-value="{ value }">
|
||||||
|
{{ parseInt(value + 543) }}
|
||||||
|
</template>
|
||||||
|
<template #trigger>
|
||||||
|
<q-input
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
class="full-width datepicker"
|
||||||
|
:model-value="
|
||||||
|
formInvestigateFacts.investigationDate != null
|
||||||
|
? dateThaiRange(formInvestigateFacts.investigationDate)
|
||||||
|
: null
|
||||||
|
"
|
||||||
|
:label="`${'วันที่สืบสวนเริ่มต้น-สิ้นสุด'}`"
|
||||||
|
>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon
|
||||||
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
style="color: var(--q-primary)"
|
||||||
|
>
|
||||||
|
</q-icon>
|
||||||
|
</template>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon
|
||||||
|
v-if="formInvestigateFacts.investigationDate !== null"
|
||||||
|
name="clear"
|
||||||
|
class="cursor-pointer"
|
||||||
|
@click.prevent.stop="
|
||||||
|
formInvestigateFacts.investigationDate = null
|
||||||
|
"
|
||||||
|
>
|
||||||
|
</q-icon>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</template>
|
||||||
|
</datepicker>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<datepicker
|
||||||
|
v-model="formInvestigateFacts.dateReceived"
|
||||||
|
:locale="'th'"
|
||||||
|
autoApply
|
||||||
|
borderless
|
||||||
|
range
|
||||||
|
:enableTimePicker="false"
|
||||||
|
week-start="0"
|
||||||
|
menu-class-name="modalfix"
|
||||||
|
>
|
||||||
|
<template #year="{ year }">
|
||||||
|
{{ year + 543 }}
|
||||||
|
</template>
|
||||||
|
<template #year-overlay-value="{ value }">
|
||||||
|
{{ parseInt(value + 543) }}
|
||||||
|
</template>
|
||||||
|
<template #trigger>
|
||||||
|
<q-input
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
class="full-width datepicker"
|
||||||
|
:model-value="
|
||||||
|
formInvestigateFacts.dateReceived != null
|
||||||
|
? dateThaiRange(formInvestigateFacts.dateReceived)
|
||||||
|
: null
|
||||||
|
"
|
||||||
|
:label="`${'วันที่รับเรื่องเริ่มต้น-สิ้นสุด'}`"
|
||||||
|
>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon
|
||||||
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
style="color: var(--q-primary)"
|
||||||
|
>
|
||||||
|
</q-icon>
|
||||||
|
</template>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon
|
||||||
|
v-if="formInvestigateFacts.dateReceived !== null"
|
||||||
|
name="clear"
|
||||||
|
class="cursor-pointer"
|
||||||
|
@click.prevent.stop="
|
||||||
|
formInvestigateFacts.dateReceived = null
|
||||||
|
"
|
||||||
|
>
|
||||||
|
</q-icon>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</template>
|
||||||
|
</datepicker>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<q-select
|
||||||
|
v-model="formInvestigateFacts.investigationStatusResult"
|
||||||
|
:options="store.statusResultOptions"
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
map-options
|
||||||
|
emit-value
|
||||||
|
clearable
|
||||||
|
label="ลักษณะการสืบสวน"
|
||||||
|
>
|
||||||
|
</q-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
v-if="route.name == 'disciplineDisciplinary'"
|
||||||
|
class="row q-col-gutter-sm"
|
||||||
|
>
|
||||||
|
<div class="col-12">
|
||||||
|
<q-select
|
||||||
|
v-model="formInvestigateDisciplinary.respondentType"
|
||||||
|
:options="store.complainantoptionsMain"
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
map-options
|
||||||
|
emit-value
|
||||||
|
clearable
|
||||||
|
label="ผู้ถูกสอบสวน"
|
||||||
|
>
|
||||||
|
</q-select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<q-select
|
||||||
|
v-model="formInvestigateDisciplinary.offenseDetails"
|
||||||
|
:options="store.offenseDetailstOptions"
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
map-options
|
||||||
|
emit-value
|
||||||
|
clearable
|
||||||
|
label="ลักษณะความผิด"
|
||||||
|
>
|
||||||
|
</q-select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<q-select
|
||||||
|
v-model="formInvestigateDisciplinary.disciplinaryFaultLevel"
|
||||||
|
:options="InvestigateDisStore.optionsfaultLevel"
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
map-options
|
||||||
|
emit-value
|
||||||
|
clearable
|
||||||
|
label="ระดับโทษความผิด"
|
||||||
|
>
|
||||||
|
</q-select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<q-input
|
||||||
|
v-model="formInvestigateDisciplinary.disciplinaryCaseFault"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
label="กรณีความผิด"
|
||||||
|
></q-input>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<datepicker
|
||||||
|
v-model="formInvestigateDisciplinary.disciplinaryDate"
|
||||||
|
:locale="'th'"
|
||||||
|
autoApply
|
||||||
|
borderless
|
||||||
|
range
|
||||||
|
:enableTimePicker="false"
|
||||||
|
week-start="0"
|
||||||
|
menu-class-name="modalfix"
|
||||||
|
>
|
||||||
|
<template #year="{ year }">
|
||||||
|
{{ year + 543 }}
|
||||||
|
</template>
|
||||||
|
<template #year-overlay-value="{ value }">
|
||||||
|
{{ parseInt(value + 543) }}
|
||||||
|
</template>
|
||||||
|
<template #trigger>
|
||||||
|
<q-input
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
class="full-width datepicker"
|
||||||
|
:model-value="
|
||||||
|
formInvestigateDisciplinary.disciplinaryDate != null
|
||||||
|
? dateThaiRange(
|
||||||
|
formInvestigateDisciplinary.disciplinaryDate
|
||||||
|
)
|
||||||
|
: null
|
||||||
|
"
|
||||||
|
:label="`${'วันที่สอบสวนเริ่มต้น-สิ้นสุด'}`"
|
||||||
|
>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon
|
||||||
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
style="color: var(--q-primary)"
|
||||||
|
>
|
||||||
|
</q-icon>
|
||||||
|
</template>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon
|
||||||
|
v-if="
|
||||||
|
formInvestigateDisciplinary.disciplinaryDate !== null
|
||||||
|
"
|
||||||
|
name="clear"
|
||||||
|
class="cursor-pointer"
|
||||||
|
@click.prevent.stop="
|
||||||
|
formInvestigateDisciplinary.disciplinaryDate = null
|
||||||
|
"
|
||||||
|
>
|
||||||
|
</q-icon>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</template>
|
||||||
|
</datepicker>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<datepicker
|
||||||
|
v-model="formInvestigateDisciplinary.dateReceived"
|
||||||
|
:locale="'th'"
|
||||||
|
autoApply
|
||||||
|
borderless
|
||||||
|
range
|
||||||
|
:enableTimePicker="false"
|
||||||
|
week-start="0"
|
||||||
|
menu-class-name="modalfix"
|
||||||
|
>
|
||||||
|
<template #year="{ year }">
|
||||||
|
{{ year + 543 }}
|
||||||
|
</template>
|
||||||
|
<template #year-overlay-value="{ value }">
|
||||||
|
{{ parseInt(value + 543) }}
|
||||||
|
</template>
|
||||||
|
<template #trigger>
|
||||||
|
<q-input
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
class="full-width datepicker"
|
||||||
|
:model-value="
|
||||||
|
formInvestigateDisciplinary.dateReceived != null
|
||||||
|
? dateThaiRange(
|
||||||
|
formInvestigateDisciplinary.dateReceived
|
||||||
|
)
|
||||||
|
: null
|
||||||
|
"
|
||||||
|
:label="`${'วันที่รับเรื่องเริ่มต้น-สิ้นสุด'}`"
|
||||||
|
>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon
|
||||||
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
style="color: var(--q-primary)"
|
||||||
|
>
|
||||||
|
</q-icon>
|
||||||
|
</template>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon
|
||||||
|
v-if="formInvestigateDisciplinary.dateReceived !== null"
|
||||||
|
name="clear"
|
||||||
|
class="cursor-pointer"
|
||||||
|
@click.prevent.stop="
|
||||||
|
formInvestigateDisciplinary.dateReceived = null
|
||||||
|
"
|
||||||
|
>
|
||||||
|
</q-icon>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</template>
|
||||||
|
</datepicker>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
v-if="route.name == 'disciplineResult'"
|
||||||
|
class="row q-col-gutter-sm"
|
||||||
|
>
|
||||||
|
<div class="col-12">
|
||||||
|
<q-select
|
||||||
|
v-model="formResult.respondentType"
|
||||||
|
:options="store.complainantoptionsMain"
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
map-options
|
||||||
|
emit-value
|
||||||
|
clearable
|
||||||
|
label="ผู้ถูกสอบสวน"
|
||||||
|
>
|
||||||
|
</q-select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<q-select
|
||||||
|
v-model="formResult.offenseDetails"
|
||||||
|
:options="store.offenseDetailstOptions"
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
map-options
|
||||||
|
emit-value
|
||||||
|
clearable
|
||||||
|
label="ลักษณะความผิด"
|
||||||
|
>
|
||||||
|
</q-select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<q-select
|
||||||
|
v-model="formResult.disciplinaryFaultLevel"
|
||||||
|
:options="InvestigateDisStore.optionsfaultLevel"
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
map-options
|
||||||
|
emit-value
|
||||||
|
clearable
|
||||||
|
label="ระดับโทษความผิด"
|
||||||
|
>
|
||||||
|
</q-select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<q-input
|
||||||
|
v-model="formResult.disciplinaryCaseFault"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
label="กรณีความผิด"
|
||||||
|
></q-input>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<datepicker
|
||||||
|
v-model="formResult.disciplinaryDate"
|
||||||
|
:locale="'th'"
|
||||||
|
autoApply
|
||||||
|
borderless
|
||||||
|
range
|
||||||
|
:enableTimePicker="false"
|
||||||
|
week-start="0"
|
||||||
|
menu-class-name="modalfix"
|
||||||
|
>
|
||||||
|
<template #year="{ year }">
|
||||||
|
{{ year + 543 }}
|
||||||
|
</template>
|
||||||
|
<template #year-overlay-value="{ value }">
|
||||||
|
{{ parseInt(value + 543) }}
|
||||||
|
</template>
|
||||||
|
<template #trigger>
|
||||||
|
<q-input
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
class="full-width datepicker"
|
||||||
|
:model-value="
|
||||||
|
formResult.disciplinaryDate != null
|
||||||
|
? dateThaiRange(formResult.disciplinaryDate)
|
||||||
|
: null
|
||||||
|
"
|
||||||
|
:label="`${'วันที่สอบสวนเริ่มต้น-สิ้นสุด'}`"
|
||||||
|
>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon
|
||||||
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
style="color: var(--q-primary)"
|
||||||
|
>
|
||||||
|
</q-icon>
|
||||||
|
</template>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon
|
||||||
|
v-if="formResult.disciplinaryDate !== null"
|
||||||
|
name="clear"
|
||||||
|
class="cursor-pointer"
|
||||||
|
@click.prevent.stop="formResult.disciplinaryDate = null"
|
||||||
|
>
|
||||||
|
</q-icon>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</template>
|
||||||
|
</datepicker>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<q-input
|
||||||
|
v-model="formResult.resultDisciplineType"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
label="ประเภทวินัย"
|
||||||
|
></q-input>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<q-input
|
||||||
|
v-model="formResult.resultTitleType"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
label="ประเภทของเรื่อง"
|
||||||
|
></q-input>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<q-input
|
||||||
|
v-model="formResult.resultOc"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
label="หน่วยงาน/ส่วนราชการ"
|
||||||
|
></q-input>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<datepicker
|
||||||
|
v-model="formResult.resultYear"
|
||||||
|
class="col-2"
|
||||||
|
:locale="'th'"
|
||||||
|
autoApply
|
||||||
|
year-picker
|
||||||
|
:enableTimePicker="false"
|
||||||
|
>
|
||||||
|
<template #year="{ year }">{{ year + 543 }}</template>
|
||||||
|
<template #year-overlay-value="{ value }">{{
|
||||||
|
parseInt(value + 543)
|
||||||
|
}}</template>
|
||||||
|
<template #trigger>
|
||||||
|
<q-input
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
:model-value="
|
||||||
|
formResult.resultYear === null
|
||||||
|
? null
|
||||||
|
: Number(formResult.resultYear) + 543
|
||||||
|
"
|
||||||
|
:label="`${'ปีงบประมาณ'}`"
|
||||||
|
>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon
|
||||||
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
style="color: var(--q-primary)"
|
||||||
|
>
|
||||||
|
</q-icon>
|
||||||
|
</template>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon
|
||||||
|
v-if="formResult.resultYear !== null"
|
||||||
|
name="clear"
|
||||||
|
class="cursor-pointer"
|
||||||
|
@click.prevent.stop="formResult.resultYear = null"
|
||||||
|
>
|
||||||
|
</q-icon>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</template>
|
||||||
|
</datepicker>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-card-section>
|
||||||
|
<q-separator />
|
||||||
|
<q-card-actions align="right">
|
||||||
|
<q-btn label="ค้นหา" color="secondary" type="submit"
|
||||||
|
><q-tooltip>ค้นหา</q-tooltip></q-btn
|
||||||
|
>
|
||||||
|
</q-card-actions>
|
||||||
|
</q-form>
|
||||||
|
</q-card>
|
||||||
|
</q-dialog>
|
||||||
|
</template>
|
||||||
|
|
@ -11,6 +11,8 @@ interface DataResult {
|
||||||
resultOc: string; //สถานะ
|
resultOc: string; //สถานะ
|
||||||
resultYear: string; //สถานะ
|
resultYear: string; //สถานะ
|
||||||
createdAt: Date | null; //วันที่ส่งเรื่องสอบสวน
|
createdAt: Date | null; //วันที่ส่งเรื่องสอบสวน
|
||||||
|
disciplinaryDateStart: Date | null; //วันที่ส่งเรื่องสอบสวนเริ่ม
|
||||||
|
disciplinaryDateEnd: Date | null; //วันที่ส่งเรื่องสอบสวนสิ้นสุด
|
||||||
}
|
}
|
||||||
interface DataResultList {
|
interface DataResultList {
|
||||||
id: string; //id รายการ
|
id: string; //id รายการ
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import type {
|
||||||
import type {
|
import type {
|
||||||
DataResult,
|
DataResult,
|
||||||
DataResultList,
|
DataResultList,
|
||||||
} from "@/modules/11_discipline/interface/response/result";
|
} from "@/modules/11_discipline/interface/response/Result";
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const storeMain = useDisciplineMainStore();
|
const storeMain = useDisciplineMainStore();
|
||||||
|
|
@ -42,7 +42,7 @@ export const useDisciplineResultStore = defineStore(
|
||||||
"offenseDetails",
|
"offenseDetails",
|
||||||
"disciplinaryFaultLevel",
|
"disciplinaryFaultLevel",
|
||||||
"disciplinaryCaseFault",
|
"disciplinaryCaseFault",
|
||||||
"createdAt",
|
"disciplinaryDate",
|
||||||
"resultDisciplineType",
|
"resultDisciplineType",
|
||||||
"resultTitleType",
|
"resultTitleType",
|
||||||
"resultOc",
|
"resultOc",
|
||||||
|
|
@ -114,11 +114,11 @@ export const useDisciplineResultStore = defineStore(
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "createdAt",
|
name: "disciplinaryDate",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "วันที่สอบสวน",
|
label: "วันที่สอบสวน",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "createdAt",
|
field: "disciplinaryDate",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -273,6 +273,12 @@ export const useDisciplineResultStore = defineStore(
|
||||||
respondentType: e.respondentType
|
respondentType: e.respondentType
|
||||||
? storeMain.convertComplaintType(e.respondentType)
|
? storeMain.convertComplaintType(e.respondentType)
|
||||||
: "-",
|
: "-",
|
||||||
|
disciplinaryDate:
|
||||||
|
e.disciplinaryDateStart && e.disciplinaryDateEnd
|
||||||
|
? `${date2Thai(e.disciplinaryDateStart)} - ${date2Thai(
|
||||||
|
e.disciplinaryDateEnd
|
||||||
|
)}`
|
||||||
|
: "-",
|
||||||
offenseDetails: e.offenseDetails
|
offenseDetails: e.offenseDetails
|
||||||
? storeMain.convertFault(e.offenseDetails)
|
? storeMain.convertFault(e.offenseDetails)
|
||||||
: "-",
|
: "-",
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import { useStructureTree } from "@/stores/structureTree";
|
||||||
import genReportXLSX from "@/plugins/genreportxlsx";
|
import genReportXLSX from "@/plugins/genreportxlsx";
|
||||||
import { useDevelopmentDataStore } from "@/modules/15_development/store/developmentStore";
|
import { useDevelopmentDataStore } from "@/modules/15_development/store/developmentStore";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { updateCurrentPage } from "@/utils/function";
|
||||||
|
|
||||||
/**importType*/
|
/**importType*/
|
||||||
import type {
|
import type {
|
||||||
|
|
@ -40,6 +41,8 @@ const {
|
||||||
messageError,
|
messageError,
|
||||||
dialogMessageNotify,
|
dialogMessageNotify,
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
|
dialogRemove,
|
||||||
|
success,
|
||||||
} = useCounterMixin();
|
} = useCounterMixin();
|
||||||
|
|
||||||
const node = ref<OrgTree[]>([]); // หน่วยงาน/ส่วนราชการ
|
const node = ref<OrgTree[]>([]); // หน่วยงาน/ส่วนราชการ
|
||||||
|
|
@ -272,6 +275,29 @@ function onRedirectToRecordPage(id: string) {
|
||||||
router.push(`/development/record/${id}`);
|
router.push(`/development/record/${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onDelete(id: string) {
|
||||||
|
dialogRemove($q, async () => {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.delete(config.API.developmentMain + `/${id}`)
|
||||||
|
.then(async () => {
|
||||||
|
formQuery.page = await updateCurrentPage(
|
||||||
|
formQuery.page,
|
||||||
|
totalList.value,
|
||||||
|
rows.value.length
|
||||||
|
);
|
||||||
|
await fetchListProject();
|
||||||
|
success($q, "ลบข้อมูลสำเร็จ");
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* function redirect หน้าบันทึกผล
|
* function redirect หน้าบันทึกผล
|
||||||
* @param id โครงการ
|
* @param id โครงการ
|
||||||
|
|
@ -525,6 +551,21 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip></q-btn
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
|
<q-btn
|
||||||
|
v-if="
|
||||||
|
formQuery.status === 'ONGOING' &&
|
||||||
|
checkPermission($route)?.attrIsUpdate &&
|
||||||
|
checkPermission($route)?.attrIsGet
|
||||||
|
"
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
dense
|
||||||
|
color="red"
|
||||||
|
icon="delete"
|
||||||
|
@click.prevent="onDelete(props.row.id)"
|
||||||
|
>
|
||||||
|
<q-tooltip>ลบข้อมูล</q-tooltip></q-btn
|
||||||
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="
|
||||||
formQuery.status === 'FINISH' &&
|
formQuery.status === 'FINISH' &&
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue