fix: ระบบพัฒนา เพิ่มปุ่มลบ/ระบบวินัย เพิ่ม ค้นหาขั้นสูง
This commit is contained in:
parent
9c5e958715
commit
852be66d2e
12 changed files with 1182 additions and 75 deletions
|
|
@ -4,6 +4,10 @@ import { useRouter } from "vue-router";
|
|||
import { useQuasar } from "quasar";
|
||||
|
||||
// importStroe
|
||||
import config from "@/app.config";
|
||||
import http from "@/plugins/http";
|
||||
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
||||
|
||||
|
|
@ -11,10 +15,7 @@ import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
|||
|
||||
// impoet Components
|
||||
import TableComplaint from "@/modules/11_discipline/components/1_Complaint/TableComplaint.vue";
|
||||
|
||||
import config from "@/app.config";
|
||||
import http from "@/plugins/http";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import DialogSearchAdvanced from "@/modules/11_discipline/components/DialogSearchAdvanced.vue";
|
||||
|
||||
const $q = useQuasar();
|
||||
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();
|
||||
|
||||
await http
|
||||
.get(
|
||||
config.API.complaintList(
|
||||
pagination.value.page,
|
||||
pagination.value.rowsPerPage,
|
||||
filterKeyword.value.trim(),
|
||||
statusFilter.value
|
||||
)
|
||||
)
|
||||
.post(config.API.complaintList(), body)
|
||||
//
|
||||
.then(async (res) => {
|
||||
totalList.value = Math.ceil(
|
||||
|
|
@ -161,7 +183,7 @@ onMounted(async () => {
|
|||
>
|
||||
</div>
|
||||
<q-space />
|
||||
|
||||
<DialogSearchAdvanced :get-data="(value:any)=> getList(value)" />
|
||||
<q-input
|
||||
for="#search"
|
||||
standout
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
|
||||
import DialogSearchAdvanced from "@/modules/11_discipline/components/DialogSearchAdvanced.vue";
|
||||
|
||||
const $q = useQuasar(); //ใช้ noti quasar
|
||||
const mixin = useCounterMixin();
|
||||
const dataInvestigate = useInvestigateFactStore();
|
||||
|
|
@ -34,17 +36,40 @@ const pagination = ref({
|
|||
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();
|
||||
await http
|
||||
.get(
|
||||
config.API.investigateMain(
|
||||
pagination.value.page,
|
||||
pagination.value.rowsPerPage,
|
||||
filterKeyword.value.trim(),
|
||||
statusFilter.value
|
||||
)
|
||||
)
|
||||
.post(config.API.investigateMain(), body)
|
||||
.then(async (res) => {
|
||||
totalList.value = Math.ceil(
|
||||
res.data.result.total / pagination.value.rowsPerPage
|
||||
|
|
@ -159,7 +184,7 @@ onMounted(async () => {
|
|||
</q-select>
|
||||
|
||||
<q-space />
|
||||
|
||||
<DialogSearchAdvanced :get-data="(value:any)=> getList(value)" />
|
||||
<q-input
|
||||
for="#search"
|
||||
standout
|
||||
|
|
|
|||
|
|
@ -29,15 +29,40 @@ const { fetchList } = dataInvestigateDis;
|
|||
const filter = ref<string>(""); //search data table
|
||||
|
||||
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();
|
||||
await http
|
||||
.get(
|
||||
config.API.disciplineDisciplinary() +
|
||||
`?page=${pagination.value.page}&pageSize=${
|
||||
pagination.value.rowsPerPage
|
||||
}&keyword=${filter.value.trim()}&status=${status.value}`
|
||||
)
|
||||
.post(config.API.disciplineDisciplinary(), body)
|
||||
.then(async (res) => {
|
||||
const data = res.data.result.data;
|
||||
totalList.value = Math.ceil(
|
||||
|
|
@ -74,9 +99,9 @@ function filterStatus(statusReturn: string) {
|
|||
getSearch();
|
||||
}
|
||||
|
||||
function getSearch() {
|
||||
function getSearch(data?:any) {
|
||||
pagination.value.page = 1;
|
||||
fetchListDisciplinary();
|
||||
fetchListDisciplinary(data);
|
||||
}
|
||||
|
||||
watch(
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ import { ref, useAttrs, watch } from "vue";
|
|||
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
|
||||
import DialogSearchAdvanced from "@/modules/11_discipline/components/DialogSearchAdvanced.vue";
|
||||
|
||||
const total = defineModel<number>("total", { required: true });
|
||||
const totalList = defineModel<number>("totalList", { required: true });
|
||||
const pagination = defineModel<any>("pagination", { required: true });
|
||||
|
|
@ -132,7 +134,7 @@ function updatePagination(newPagination: any) {
|
|||
</script>
|
||||
|
||||
<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
|
||||
v-model="statusFilter"
|
||||
label="สถานะ"
|
||||
|
|
@ -169,6 +171,7 @@ function updatePagination(newPagination: any) {
|
|||
|
||||
<q-space />
|
||||
<!-- ค้นหาข้อความใน table -->
|
||||
<DialogSearchAdvanced :get-data="(value:any)=> props.getSearch?.(value)" />
|
||||
<q-input
|
||||
standout
|
||||
dense
|
||||
|
|
@ -176,13 +179,20 @@ function updatePagination(newPagination: any) {
|
|||
ref="filterRef"
|
||||
@update:model-value="updateInput"
|
||||
outlined
|
||||
placeholder="ค้นหาเรื่องร้องเรียน"
|
||||
placeholder="ค้นหา"
|
||||
style="max-width: 200px"
|
||||
@keydown.enter.prevent="filterFn"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
<q-tooltip
|
||||
transition-show="scale"
|
||||
transition-hide="scale"
|
||||
class="text-body2"
|
||||
>หมายเหตุ: ค้นหาจากเรื่องร้องเรียน
|
||||
ระดับโทษความผิดหรือกรณีความผิด</q-tooltip
|
||||
>
|
||||
</q-input>
|
||||
<!-- แสดงคอลัมน์ใน table -->
|
||||
<q-select
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import type {
|
|||
FormRef,
|
||||
DataOption,
|
||||
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 PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||
|
|
|
|||
|
|
@ -31,13 +31,42 @@ const pagination = ref({
|
|||
});
|
||||
|
||||
/** 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();
|
||||
await http
|
||||
.get(
|
||||
config.API.listResult() +
|
||||
`?page=${pagination.value.page}&pageSize=${pagination.value.rowsPerPage}&keyword=${filter.value.trim()}&status=${status.value}`
|
||||
)
|
||||
.post(config.API.listResult(), body)
|
||||
.then(async (res) => {
|
||||
const data = res.data.result.data;
|
||||
totalList.value = Math.ceil(
|
||||
|
|
@ -74,9 +103,9 @@ function filterStatus(statusReturn: string) {
|
|||
getSearch();
|
||||
}
|
||||
|
||||
function getSearch() {
|
||||
function getSearch(data?: any) {
|
||||
pagination.value.page = 1;
|
||||
fetchListResult();
|
||||
fetchListResult(data);
|
||||
}
|
||||
|
||||
watch(
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ import { ref, useAttrs, watch } from "vue";
|
|||
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
|
||||
import DialogSearchAdvanced from "@/modules/11_discipline/components/DialogSearchAdvanced.vue";
|
||||
|
||||
const total = defineModel<number>("total", { required: true });
|
||||
const totalList = defineModel<number>("totalList", { required: true });
|
||||
const pagination = defineModel<any>("pagination", { required: true });
|
||||
|
|
@ -111,7 +113,7 @@ function updatePagination(newPagination: any) {
|
|||
</script>
|
||||
|
||||
<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>
|
||||
|
||||
<q-select
|
||||
|
|
@ -147,6 +149,7 @@ function updatePagination(newPagination: any) {
|
|||
</q-select>
|
||||
|
||||
<q-space />
|
||||
<DialogSearchAdvanced :get-data="(value:any)=> props.getSearch?.(value)" />
|
||||
<q-input
|
||||
standout
|
||||
dense
|
||||
|
|
@ -155,18 +158,20 @@ function updatePagination(newPagination: any) {
|
|||
@keydown.enter.prevent="filterFn"
|
||||
@update:model-value="updateInput"
|
||||
outlined
|
||||
placeholder="ค้นหาเรื่องร้องเรียน"
|
||||
placeholder="ค้นหา"
|
||||
style="max-width: 200px"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
<q-tooltip
|
||||
anchor="bottom left"
|
||||
transition-show="scale"
|
||||
transition-hide="scale"
|
||||
class="text-body2"
|
||||
>หมายเหตุ: ค้นหาเรื่องร้องเรียน, ประเภทของเรื่อง,
|
||||
หน่วยงานหรือปีงบประมาณ</q-tooltip
|
||||
>
|
||||
หมายเหตุ: ค้นหาจากเรื่องร้องเรียน ประเภทวินัย ประเภทของเรื่อง
|
||||
หน่วนงาน/ส่วนราชการ หรือปีงบประมาณ</q-tooltip
|
||||
>
|
||||
</q-input>
|
||||
<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; //สถานะ
|
||||
resultYear: string; //สถานะ
|
||||
createdAt: Date | null; //วันที่ส่งเรื่องสอบสวน
|
||||
disciplinaryDateStart: Date | null; //วันที่ส่งเรื่องสอบสวนเริ่ม
|
||||
disciplinaryDateEnd: Date | null; //วันที่ส่งเรื่องสอบสวนสิ้นสุด
|
||||
}
|
||||
interface DataResultList {
|
||||
id: string; //id รายการ
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import type {
|
|||
import type {
|
||||
DataResult,
|
||||
DataResultList,
|
||||
} from "@/modules/11_discipline/interface/response/result";
|
||||
} from "@/modules/11_discipline/interface/response/Result";
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const storeMain = useDisciplineMainStore();
|
||||
|
|
@ -42,7 +42,7 @@ export const useDisciplineResultStore = defineStore(
|
|||
"offenseDetails",
|
||||
"disciplinaryFaultLevel",
|
||||
"disciplinaryCaseFault",
|
||||
"createdAt",
|
||||
"disciplinaryDate",
|
||||
"resultDisciplineType",
|
||||
"resultTitleType",
|
||||
"resultOc",
|
||||
|
|
@ -114,11 +114,11 @@ export const useDisciplineResultStore = defineStore(
|
|||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "createdAt",
|
||||
name: "disciplinaryDate",
|
||||
align: "left",
|
||||
label: "วันที่สอบสวน",
|
||||
sortable: true,
|
||||
field: "createdAt",
|
||||
field: "disciplinaryDate",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
|
@ -273,6 +273,12 @@ export const useDisciplineResultStore = defineStore(
|
|||
respondentType: e.respondentType
|
||||
? storeMain.convertComplaintType(e.respondentType)
|
||||
: "-",
|
||||
disciplinaryDate:
|
||||
e.disciplinaryDateStart && e.disciplinaryDateEnd
|
||||
? `${date2Thai(e.disciplinaryDateStart)} - ${date2Thai(
|
||||
e.disciplinaryDateEnd
|
||||
)}`
|
||||
: "-",
|
||||
offenseDetails: e.offenseDetails
|
||||
? storeMain.convertFault(e.offenseDetails)
|
||||
: "-",
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import { useStructureTree } from "@/stores/structureTree";
|
|||
import genReportXLSX from "@/plugins/genreportxlsx";
|
||||
import { useDevelopmentDataStore } from "@/modules/15_development/store/developmentStore";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { updateCurrentPage } from "@/utils/function";
|
||||
|
||||
/**importType*/
|
||||
import type {
|
||||
|
|
@ -40,6 +41,8 @@ const {
|
|||
messageError,
|
||||
dialogMessageNotify,
|
||||
dialogConfirm,
|
||||
dialogRemove,
|
||||
success,
|
||||
} = useCounterMixin();
|
||||
|
||||
const node = ref<OrgTree[]>([]); // หน่วยงาน/ส่วนราชการ
|
||||
|
|
@ -272,6 +275,29 @@ function onRedirectToRecordPage(id: string) {
|
|||
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 หน้าบันทึกผล
|
||||
* @param id โครงการ
|
||||
|
|
@ -525,6 +551,21 @@ onMounted(() => {
|
|||
>
|
||||
<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
|
||||
v-if="
|
||||
formQuery.status === 'FINISH' &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue