แก้ไขเรื่องร้องเรียน, สืบสวน, สอบสวน
This commit is contained in:
parent
76594a2359
commit
f247167e9a
20 changed files with 1356 additions and 1714 deletions
|
|
@ -52,11 +52,11 @@ export default {
|
||||||
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}`,
|
||||||
// disciplineDirector: () => `${disciplineMain}/director`,
|
disciplineDirector: () => `${discipline}/director`,
|
||||||
disciplineDoc: (type: string, id: string) =>
|
disciplineDoc: (type: string, id: string) =>
|
||||||
`${discipline}/${type}/file/${id}`,
|
`${discipline}/${type}/file/${id}`,
|
||||||
disciplineByIdDoc: (type: string, id: string, docId: string) =>
|
disciplineByIdDoc: (type: string, id: string, docId: string) =>
|
||||||
`${discipline}/disciplinary/${type}/file/${id}/${docId}`,
|
`${discipline}/${type}/file/${id}/${docId}`,
|
||||||
disciplinaryReject: (id: string) => `${discipline}/reject/${id}`,
|
disciplinaryReject: (id: string) => `${discipline}/reject/${id}`,
|
||||||
disciplinaryResume: (id: string) => `${discipline}/resume/${id}`,
|
disciplinaryResume: (id: string) => `${discipline}/resume/${id}`,
|
||||||
disciplinaryApprove: (id: string) => `${discipline}/approve/${id}`,
|
disciplinaryApprove: (id: string) => `${discipline}/approve/${id}`,
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,13 @@ import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type { ResponsePreson } from "@/interface/response/listPerson";
|
import type { ResponsePreson } from "@/interface/response/listPerson";
|
||||||
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store";
|
||||||
|
|
||||||
|
const mainStore = useDisciplineMainStore();
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm, dialogMessageNotify, showLoader, hideLoader } = mixin;
|
const { dialogMessageNotify, showLoader, hideLoader } = mixin;
|
||||||
|
|
||||||
interface typeOp {
|
interface typeOp {
|
||||||
id: string;
|
id: string;
|
||||||
|
|
@ -34,7 +37,6 @@ const rows = ref<tableType[]>([]);
|
||||||
const type = ref<string>("idcard");
|
const type = ref<string>("idcard");
|
||||||
const search = ref<string>("");
|
const search = ref<string>("");
|
||||||
const selected = ref<any>([]);
|
const selected = ref<any>([]);
|
||||||
const dataObject = ref<any>([]);
|
|
||||||
|
|
||||||
const typeOps = ref<typeOp[]>([
|
const typeOps = ref<typeOp[]>([
|
||||||
{ id: "idcard", name: "เลขประจำตัวประชาชน" },
|
{ id: "idcard", name: "เลขประจำตัวประชาชน" },
|
||||||
|
|
@ -42,94 +44,6 @@ const typeOps = ref<typeOp[]>([
|
||||||
{ id: "lastname", name: "นามสกุล" },
|
{ id: "lastname", name: "นามสกุล" },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/** หัวข้อที่เเสดงในตาราง */
|
|
||||||
const visibleColumns = ref<string[]>([
|
|
||||||
"no",
|
|
||||||
"idcard",
|
|
||||||
"name",
|
|
||||||
"posNo",
|
|
||||||
"position",
|
|
||||||
"positionLevel",
|
|
||||||
"salary",
|
|
||||||
"organization",
|
|
||||||
]);
|
|
||||||
|
|
||||||
/** หัวตาราง */
|
|
||||||
const columns = ref<QTableProps["columns"]>([
|
|
||||||
{
|
|
||||||
name: "no",
|
|
||||||
align: "left",
|
|
||||||
label: "ลำดับ",
|
|
||||||
sortable: false,
|
|
||||||
field: "no",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "idcard",
|
|
||||||
align: "left",
|
|
||||||
label: "เลขบัตรประชาชน",
|
|
||||||
sortable: true,
|
|
||||||
field: "idcard",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "name",
|
|
||||||
align: "left",
|
|
||||||
label: "ชื่อ - นามสกุล",
|
|
||||||
sortable: true,
|
|
||||||
field: "name",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "posNo",
|
|
||||||
align: "left",
|
|
||||||
label: "ตำแหน่งเลขที่",
|
|
||||||
sortable: true,
|
|
||||||
field: "posNo",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "position",
|
|
||||||
align: "left",
|
|
||||||
label: "ตำแหน่ง",
|
|
||||||
sortable: true,
|
|
||||||
field: "position",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "positionLevel",
|
|
||||||
align: "left",
|
|
||||||
label: "ระดับ",
|
|
||||||
sortable: true,
|
|
||||||
field: "positionLevel",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "salary",
|
|
||||||
align: "left",
|
|
||||||
label: "เงินเดือน",
|
|
||||||
sortable: true,
|
|
||||||
field: "salary",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "organization",
|
|
||||||
align: "left",
|
|
||||||
label: "หน่วยงาน",
|
|
||||||
sortable: true,
|
|
||||||
field: "organization",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
/** รับค่ามาจาก หน้าหลัก */
|
/** รับค่ามาจาก หน้าหลัก */
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
checkId: {
|
checkId: {
|
||||||
|
|
@ -231,13 +145,6 @@ async function searchInput() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** update ตาราง เมื่อ input ว่าง */
|
|
||||||
function updateInput() {
|
|
||||||
if (!search.value) {
|
|
||||||
rows.value = dataObject.value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** update เมื่อเปลี่ยน option */
|
/** update เมื่อเปลี่ยน option */
|
||||||
function updateSelect() {
|
function updateSelect() {
|
||||||
search.value = "";
|
search.value = "";
|
||||||
|
|
@ -305,7 +212,7 @@ function updateSelect() {
|
||||||
<div class="full-width q-mt-sm">
|
<div class="full-width q-mt-sm">
|
||||||
<d-table
|
<d-table
|
||||||
ref="table"
|
ref="table"
|
||||||
:columns="columns"
|
:columns="mainStore.columnsRespondent"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
row-key="personId"
|
row-key="personId"
|
||||||
flat
|
flat
|
||||||
|
|
@ -313,7 +220,7 @@ function updateSelect() {
|
||||||
:paging="true"
|
:paging="true"
|
||||||
dense
|
dense
|
||||||
class="custom-header-table"
|
class="custom-header-table"
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="mainStore.visibleColumnsRespondent"
|
||||||
selection="multiple"
|
selection="multiple"
|
||||||
v-model:selected="selected"
|
v-model:selected="selected"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, reactive, ref } from "vue";
|
import { onMounted, reactive, ref } from "vue";
|
||||||
import Form from "@/modules/11_discipline/components/1_Complaint/Form.vue";
|
import Form from "@/modules/11_discipline/components/1_Complaint/Form.vue";
|
||||||
import Popup from "@/modules/11_discipline/components/1_Complaint/Popup.vue";
|
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
@ -15,7 +15,10 @@ import type {
|
||||||
} from "@/modules/11_discipline/interface/request/complaint";
|
} from "@/modules/11_discipline/interface/request/complaint";
|
||||||
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";
|
||||||
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store";
|
||||||
|
|
||||||
const complainstStore = useComplainstDataStore();
|
const complainstStore = useComplainstDataStore();
|
||||||
|
const mainStore = useDisciplineMainStore();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const {
|
const {
|
||||||
|
|
@ -34,6 +37,7 @@ const modalPopup = ref<boolean>(false);
|
||||||
|
|
||||||
/** ข้อมูล v-model ของฟอร์ม */
|
/** ข้อมูล v-model ของฟอร์ม */
|
||||||
const personOj = reactive<ArrayPerson>({
|
const personOj = reactive<ArrayPerson>({
|
||||||
|
id: "",
|
||||||
personId: "",
|
personId: "",
|
||||||
idcard: "",
|
idcard: "",
|
||||||
name: "",
|
name: "",
|
||||||
|
|
@ -74,67 +78,6 @@ const data = reactive<FormData>({
|
||||||
disciplineComplaintDocs: [fileListOj],
|
disciplineComplaintDocs: [fileListOj],
|
||||||
});
|
});
|
||||||
|
|
||||||
/** ดึงค่าจาก api */
|
|
||||||
// const fetchData = async () => {
|
|
||||||
// data.respondentType = "PERSON";
|
|
||||||
// data.organizationId = "0";
|
|
||||||
// data.consideredAgency = "2";
|
|
||||||
// data.title = "ทุจริตในหน้าที่";
|
|
||||||
// data.description = "มีข้อร้องเรียนเรื่องการทุจริตทางการเงิน";
|
|
||||||
// data.dateReceived = new Date("2023-11-05");
|
|
||||||
// data.dateConsideration = new Date("2023-11-07T14:58:00");
|
|
||||||
// data.offenseDetails = "NOT_SPECIFIED";
|
|
||||||
// data.levelConsideration = "NORMAL";
|
|
||||||
// data.dateNotification = new Date("2023-11-07T14:58:00");
|
|
||||||
// data.complaintFrom = "สตง";
|
|
||||||
// data.appellant = "สมศรี สุขใจ";
|
|
||||||
// data.documentFile = "";
|
|
||||||
// data.complaintStatus = "NEW";
|
|
||||||
// (data.persons = [
|
|
||||||
// {
|
|
||||||
// idcard: "1529900022223",
|
|
||||||
// name: "นางศิรินภา คงน้อย",
|
|
||||||
// positionNo: "สกก.1",
|
|
||||||
// position: "ธุรการ",
|
|
||||||
// positionLevel: "ต้น",
|
|
||||||
// salary: "10000",
|
|
||||||
// organization: "สกจ.",
|
|
||||||
// },
|
|
||||||
// ]),
|
|
||||||
// (data.fileList = [
|
|
||||||
// {
|
|
||||||
// id: "08dbeb08-1931-487d-8989-0725ce48031d",
|
|
||||||
// file: "https://s3cluster.frappet.com/bma-ehr-fpt/edb095bf-8898-4ef8-ad60-daaf60991b8f?AWSAccessKeyId=frappet&Expires=1700657567&Signature=7Do0YexqpTJGA4DQPKzJ5YtvyJg%3D",
|
|
||||||
// fileName: "ex_slip.jpeg.png14",
|
|
||||||
// fileType: "image/png",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// id: "08dbeb08-392b-41b8-8970-78934f317469",
|
|
||||||
// file: "https://s3cluster.frappet.com/bma-ehr-fpt/5a32c821-46d6-4bbc-9824-b777f154702e?AWSAccessKeyId=frappet&Expires=1700657567&Signature=HlNAjybBNPqGAYJtHIefNRofz1E%3D",
|
|
||||||
// fileName: "17058616.jpg",
|
|
||||||
// fileType: "image/jpeg",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// id: "08dbeb08-3e41-4500-8476-6bdd76f0b6c8",
|
|
||||||
// file: "https://s3cluster.frappet.com/bma-ehr-fpt/1bf5ef61-05f3-4cb1-98a5-dd2698b49440?AWSAccessKeyId=frappet&Expires=1700657567&Signature=WAlAjPbX%2BUoO0zY7m1jDEb3ovvA%3D",
|
|
||||||
// fileName: "17058616.jpg",
|
|
||||||
// fileType: "image/jpeg",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// id: "08dbeb08-428f-483b-8d50-718e947d012e",
|
|
||||||
// file: "https://s3cluster.frappet.com/bma-ehr-fpt/d848952a-54af-4502-b235-1f01f441d86c?AWSAccessKeyId=frappet&Expires=1700657568&Signature=3L9QfaWLCHmZjeS2UttVM3se6W0%3D",
|
|
||||||
// fileName: "HybGoQu8osQ49G7AzCOvYF4G.png",
|
|
||||||
// fileType: "image/png",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// id: "08dbeb08-8aa5-4264-87bf-1794be50f0c7",
|
|
||||||
// file: "https://s3cluster.frappet.com/bma-ehr-fpt/ac55b1f8-54f6-43c4-9f85-c236d24e7d76?AWSAccessKeyId=frappet&Expires=1700657568&Signature=isN3RM3P4%2BP5lgK5%2F45h1U5pabI%3D",
|
|
||||||
// fileName: "1300399ปปปป.jpg",
|
|
||||||
// fileType: "image/jpeg",
|
|
||||||
// },
|
|
||||||
// ]);
|
|
||||||
// };
|
|
||||||
|
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
|
|
@ -271,28 +214,33 @@ async function onSubmit(data: any) {
|
||||||
|
|
||||||
/** ยืนยัน มีมูลส่งไปสืบสวน */
|
/** ยืนยัน มีมูลส่งไปสืบสวน */
|
||||||
function sentInvestigate() {
|
function sentInvestigate() {
|
||||||
if (complainstStore.rowsAdd.length > 0) {
|
if (mainStore.rowsAdd.length > 0) {
|
||||||
modalPopup.value = true;
|
modalPopup.value = true;
|
||||||
} else {
|
} else {
|
||||||
dialogConfirm($q,()=>sentConfirm(),'ยืนยันส่งไปสืบสวน','ต้องการยืนยันยืนยันส่งไปสืบสวนใช่หรือไม่?')
|
dialogConfirm(
|
||||||
|
$q,
|
||||||
|
() => sentConfirmNoPerson(),
|
||||||
|
"ยืนยันส่งไปสืบสวน",
|
||||||
|
"ต้องการยืนยันยืนยันส่งไปสืบสวนใช่หรือไม่?"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function sentConfirm(){
|
function sentConfirmNoPerson() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.put(config.API.complaintApprove(id.value), {
|
.put(config.API.complaintApprove(id.value), {
|
||||||
persons: [],
|
persons: [],
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
router.push(`/discipline/complaints`);
|
router.push(`/discipline/complaints`);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function closePopup() {
|
function closePopup() {
|
||||||
|
|
@ -355,8 +303,9 @@ function confirmCancelInvestigate() {
|
||||||
* ดึงข้อมูล จาก component เเล้ว update
|
* ดึงข้อมูล จาก component เเล้ว update
|
||||||
* @param data person data
|
* @param data person data
|
||||||
*/
|
*/
|
||||||
function emitPerson(data: ArrayPerson[]) {
|
function sendPersonToNext(data: ArrayPerson[]) {
|
||||||
const dataMapId = data.map((item: ArrayPerson) => item.personId);
|
const dataMapId = data.map((item: ArrayPerson) => item.id);
|
||||||
|
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.put(config.API.complaintApprove(id.value), {
|
.put(config.API.complaintApprove(id.value), {
|
||||||
|
|
@ -379,6 +328,7 @@ onMounted(() => {
|
||||||
getData();
|
getData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="col-xs-12 col-sm-12 col-md-11">
|
<div class="col-xs-12 col-sm-12 col-md-11">
|
||||||
<div class="toptitle col-12 row items-end">
|
<div class="toptitle col-12 row items-end">
|
||||||
|
|
@ -417,11 +367,11 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Form :on-submit="onSubmit" :data="data" :get-data="getData" />
|
<Form :on-submit="onSubmit" :data="data" :get-data="getData" />
|
||||||
<Popup
|
<PopupSendToNext
|
||||||
:modal="modalPopup"
|
:modal="modalPopup"
|
||||||
:close="closePopup"
|
:close="closePopup"
|
||||||
@return-person="emitPerson"
|
@return-person="sendPersonToNext"
|
||||||
:rows="complainstStore.rowsAdd"
|
:rows="mainStore.rowsAdd"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:visibleColumns="visibleColumns"
|
:visibleColumns="visibleColumns"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -1,33 +1,31 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, reactive, watch, watchEffect } from "vue";
|
import { ref, onMounted, reactive, watch, watchEffect } from "vue";
|
||||||
import { is, useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRouter } from "vue-router";
|
|
||||||
import type { QTableProps } from "quasar";
|
|
||||||
/** import Type */
|
/** import Type */
|
||||||
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
||||||
import type {
|
import type {
|
||||||
FormData,
|
FormData,
|
||||||
MyObjectComplaintsRef,
|
MyObjectComplaintsRef,
|
||||||
DataAddRequest,
|
|
||||||
ArrayPerson,
|
|
||||||
ArrayFileList,
|
ArrayFileList,
|
||||||
} from "@/modules/11_discipline/interface/request/complaint";
|
} from "@/modules/11_discipline/interface/request/complaint";
|
||||||
|
|
||||||
/** importStroe*/
|
/** importStroe*/
|
||||||
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";
|
||||||
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store";
|
||||||
|
|
||||||
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const router = useRouter();
|
|
||||||
const fileDocDataUpload = ref<File[]>([]);
|
const fileDocDataUpload = ref<File[]>([]);
|
||||||
|
|
||||||
/** เรียกใช้ store */
|
/** เรียกใช้ store */
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const complainstStore = useComplainstDataStore();
|
const complainstStore = useComplainstDataStore();
|
||||||
|
const mainStore = useDisciplineMainStore();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
date2Thai,
|
date2Thai,
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
|
|
@ -37,11 +35,10 @@ const {
|
||||||
hideLoader,
|
hideLoader,
|
||||||
showLoader,
|
showLoader,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
const { selectComplainantTpye, filterSelector } = complainstStore; // function จาก store complainstStore
|
const { filterSelector } = complainstStore; // function จาก store complainstStore
|
||||||
|
|
||||||
/** validateForm */
|
/** validateForm */
|
||||||
const respondentTypeRef = ref<Object | null>(null);
|
const respondentTypeRef = ref<Object | null>(null);
|
||||||
const complainantRef = ref<Object | null>(null);
|
|
||||||
const organizationIdRef = ref<Object | null>(null);
|
const organizationIdRef = ref<Object | null>(null);
|
||||||
const consideredAgencyRef = ref<Object | null>(null);
|
const consideredAgencyRef = ref<Object | null>(null);
|
||||||
const titleRef = ref<Object | null>(null);
|
const titleRef = ref<Object | null>(null);
|
||||||
|
|
@ -56,6 +53,7 @@ const appellantRef = ref<Object | null>(null);
|
||||||
const resultRef = ref<Object | null>(null);
|
const resultRef = ref<Object | null>(null);
|
||||||
|
|
||||||
const isSave = ref<boolean>(false); // มีการแก้ไขรอบันทึก
|
const isSave = ref<boolean>(false); // มีการแก้ไขรอบันทึก
|
||||||
|
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
||||||
|
|
||||||
const fileList = ref<ArrayFileList[]>([]);
|
const fileList = ref<ArrayFileList[]>([]);
|
||||||
/** รับ props มาจากหน้าหลัก */
|
/** รับ props มาจากหน้าหลัก */
|
||||||
|
|
@ -112,132 +110,21 @@ const objectComplaintsRef: MyObjectComplaintsRef = {
|
||||||
result: resultRef,
|
result: resultRef,
|
||||||
};
|
};
|
||||||
|
|
||||||
/** options ทั้งหมด*/
|
// /**
|
||||||
const offenseDetailstoptions = ref<DataOption[]>([
|
// * รับค่าผู้ถูกร้องเรียน
|
||||||
{ id: "NOT_SPECIFIED", name: "ยังไม่ระบุ" },
|
// * @param val บุคคล หน่วยงาน กทม
|
||||||
{ id: "NOT_DEADLY", name: "ไม่ร้ายแรง" },
|
// */
|
||||||
{ id: "DEADLY", name: "ร้ายแรง" },
|
// async function selectComplainant(val: string) {
|
||||||
]);
|
// formData.organizationId = "";
|
||||||
const levelConsiderationtoptions = ref<DataOption[]>([
|
// formData.consideredAgency = "";
|
||||||
{ id: "NORMAL", name: "ปกติ" },
|
|
||||||
{ id: "URGENT", name: "ด่วน" },
|
|
||||||
{ id: "VERY_URGENT", name: "ด่วนมาก" },
|
|
||||||
]);
|
|
||||||
const complaintFromtoptions = ref<DataOption[]>([]);
|
|
||||||
|
|
||||||
/** หัวตาราง */
|
// if (val === "1") {
|
||||||
const columns = ref<QTableProps["columns"]>([
|
// await fetchOffice(); // ถ้าเลือกหน่วยงานจะเรียก function fetchOffice เรียกโครงสร้างสำนักงาน
|
||||||
{
|
// }
|
||||||
name: "info",
|
// }
|
||||||
align: "left",
|
|
||||||
label: "",
|
|
||||||
sortable: false,
|
|
||||||
field: "info",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "no",
|
|
||||||
align: "left",
|
|
||||||
label: "ลำดับ",
|
|
||||||
sortable: false,
|
|
||||||
field: "no",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "idcard",
|
|
||||||
align: "left",
|
|
||||||
label: "เลขบัตรประชาชน",
|
|
||||||
sortable: true,
|
|
||||||
field: "idcard",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "name",
|
|
||||||
align: "left",
|
|
||||||
label: "ชื่อ - นามสกุล",
|
|
||||||
sortable: true,
|
|
||||||
field: "name",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "posNo",
|
|
||||||
align: "left",
|
|
||||||
label: "ตำแหน่งเลขที่",
|
|
||||||
sortable: true,
|
|
||||||
field: "posNo",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "position",
|
|
||||||
align: "left",
|
|
||||||
label: "ตำแหน่ง",
|
|
||||||
sortable: true,
|
|
||||||
field: "position",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "positionLevel",
|
|
||||||
align: "left",
|
|
||||||
label: "ระดับ",
|
|
||||||
sortable: true,
|
|
||||||
field: "positionLevel",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "salary",
|
|
||||||
align: "left",
|
|
||||||
label: "เงินเดือน",
|
|
||||||
sortable: true,
|
|
||||||
field: "salary",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "organization",
|
|
||||||
align: "left",
|
|
||||||
label: "หน่วยงาน",
|
|
||||||
sortable: true,
|
|
||||||
field: "organization",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
/** หัวข้อที่เเสดงในตาราง */
|
// /** เรียกโครงสร้างสำนักงาน */
|
||||||
const visibleColumns = ref<string[]>([
|
// async function fetchOffice() {}
|
||||||
"info",
|
|
||||||
"no",
|
|
||||||
"idcard",
|
|
||||||
"name",
|
|
||||||
"posNo",
|
|
||||||
"position",
|
|
||||||
"positionLevel",
|
|
||||||
"salary",
|
|
||||||
"organization",
|
|
||||||
]);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* รับค่าผู้ถูกร้องเรียน
|
|
||||||
* @param val บุคคล หน่วยงาน กทม
|
|
||||||
*/
|
|
||||||
async function selectComplainant(val: string) {
|
|
||||||
formData.organizationId = "";
|
|
||||||
formData.consideredAgency = "";
|
|
||||||
|
|
||||||
if (val === "1") {
|
|
||||||
await fetchOffice(); // ถ้าเลือกหน่วยงานจะเรียก function fetchOffice เรียกโครงสร้างสำนักงาน
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** เรียกโครงสร้างสำนักงาน */
|
|
||||||
async function fetchOffice() {}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ฟังชั่นอัปโหลดไฟล์
|
* ฟังชั่นอัปโหลดไฟล์
|
||||||
|
|
@ -296,8 +183,8 @@ function onSubmit() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
if (complainstStore.rowsAdd) {
|
if (mainStore.rowsAdd) {
|
||||||
formData.persons = complainstStore.rowsAdd;
|
formData.persons = mainStore.rowsAdd;
|
||||||
props.onSubmit(formData);
|
props.onSubmit(formData);
|
||||||
} else props.onSubmit(formData);
|
} else props.onSubmit(formData);
|
||||||
// props.onSubmit(formData);
|
// props.onSubmit(formData);
|
||||||
|
|
@ -353,25 +240,30 @@ function confirmDelete(id: string) {
|
||||||
* เก็บข้อมูลลง formData
|
* เก็บข้อมูลลง formData
|
||||||
*/
|
*/
|
||||||
watch(props.data, async () => {
|
watch(props.data, async () => {
|
||||||
fileList.value = props.data.disciplineComplaintDocs;
|
if (props.data !== null) {
|
||||||
complainstStore.fetchComplainstAdd(props.data.persons);
|
isReadonly.value = props.data.status != "NEW" ?? true;
|
||||||
|
isSave.value = false;
|
||||||
|
|
||||||
formData.id = props.data.id;
|
fileList.value = props.data.disciplineComplaintDocs;
|
||||||
formData.respondentType = props.data.respondentType;
|
mainStore.fetchData(props.data.persons);
|
||||||
formData.organizationId = props.data.organizationId;
|
|
||||||
formData.consideredAgency = props.data.consideredAgency;
|
formData.id = props.data.id;
|
||||||
formData.title = props.data.title;
|
formData.respondentType = props.data.respondentType;
|
||||||
formData.description = props.data.description;
|
formData.organizationId = props.data.organizationId;
|
||||||
formData.dateReceived = props.data.dateReceived;
|
formData.consideredAgency = props.data.consideredAgency;
|
||||||
formData.dateConsideration = props.data.dateConsideration;
|
formData.title = props.data.title;
|
||||||
formData.offenseDetails = props.data.offenseDetails;
|
formData.description = props.data.description;
|
||||||
formData.levelConsideration = props.data.levelConsideration;
|
formData.dateReceived = props.data.dateReceived;
|
||||||
formData.dateNotification = props.data.dateNotification;
|
formData.dateConsideration = props.data.dateConsideration;
|
||||||
formData.complaintFrom = props.data.complaintFrom;
|
formData.offenseDetails = props.data.offenseDetails;
|
||||||
formData.appellant = props.data.appellant;
|
formData.levelConsideration = props.data.levelConsideration;
|
||||||
formData.status = props.data.status;
|
formData.dateNotification = props.data.dateNotification;
|
||||||
formData.result = props.data.result;
|
formData.complaintFrom = props.data.complaintFrom;
|
||||||
formData.persons = complainstStore.rowsAdd;
|
formData.appellant = props.data.appellant;
|
||||||
|
formData.status = props.data.status;
|
||||||
|
formData.result = props.data.result;
|
||||||
|
formData.persons = mainStore.rowsAdd;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -383,6 +275,9 @@ function handleSave(returnData: any) {
|
||||||
toggleModal();
|
toggleModal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ฟังก์ชั่นสำหรับอัพโหลดไฟล์เอกสารหลักฐาน
|
||||||
|
*/
|
||||||
function upLoadFileDoc() {
|
function upLoadFileDoc() {
|
||||||
const Data = new FormData();
|
const Data = new FormData();
|
||||||
Data.append("file", formData.documentFile);
|
Data.append("file", formData.documentFile);
|
||||||
|
|
@ -390,7 +285,7 @@ function upLoadFileDoc() {
|
||||||
http
|
http
|
||||||
.put(config.API.complaintFileUpload(formData.id), Data)
|
.put(config.API.complaintFileUpload(formData.id), Data)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "อัพโหลดไฟล์สำเร็จ");
|
||||||
props.getData();
|
props.getData();
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -402,12 +297,17 @@ function upLoadFileDoc() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ฟังก์ชั่นเพิ่มรายชื่อผู้ถูกสอบสวนจาก popup มายังรายการผู้ถูกสอบสวนหน้าหลัก
|
||||||
|
* @param data ข้อมูลรายชื่อผู้ถูกสอบสวนเป็น array
|
||||||
|
*/
|
||||||
async function addPerson(data: any) {
|
async function addPerson(data: any) {
|
||||||
toggleModal();
|
toggleModal();
|
||||||
changeFormData();
|
changeFormData();
|
||||||
await complainstStore.fetchComplainstAdd(data);
|
await mainStore.fetchData(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** ดึงข้อมูลหน่วยงานจาก api */
|
||||||
function getOc() {
|
function getOc() {
|
||||||
http.get(config.API.typeOc()).then((res) => {
|
http.get(config.API.typeOc()).then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
@ -415,39 +315,43 @@ function getOc() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ฟังก์ชั่นลบผู้ถูกร้องเรียนออกจากรายการ
|
||||||
|
* @param id id ของผู้ถูกร้อง
|
||||||
|
*/
|
||||||
function deletePerson(id: string) {
|
function deletePerson(id: string) {
|
||||||
dialogRemove($q, () => removePerson(id));
|
dialogRemove($q, () => {
|
||||||
}
|
changeFormData();
|
||||||
|
const dataRow = mainStore.rowsAdd;
|
||||||
function removePerson(id: string) {
|
const updatedRows = dataRow.filter((item: any) => item.personId !== id);
|
||||||
changeFormData();
|
mainStore.rowsAdd = updatedRows;
|
||||||
const dataRow = complainstStore.rowsAdd;
|
|
||||||
const updatedRows = dataRow.filter((item: any) => item.personId !== id);
|
|
||||||
complainstStore.rowsAdd = updatedRows;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getListChannel() {
|
|
||||||
http.get(config.API.complaintListOp()).then((res) => {
|
|
||||||
complaintFromtoptions.value = res.data.result.data;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** ช่องทางการร้องเรียน และฟังก์ชั่นการดึงข้อมูลช่องทางการร้องเรียนมาจาก api*/
|
||||||
|
const channelOptions = ref<DataOption[]>([]);
|
||||||
|
function getListChannel() {
|
||||||
|
http.get(config.API.complaintListOp()).then((res) => {
|
||||||
|
channelOptions.value = res.data.result.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** ฟังก์ชั่นเช็คการแก้ไขฟอร์มแล้วไม่ได้กดบันทึก */
|
||||||
function changeFormData() {
|
function changeFormData() {
|
||||||
isSave.value = props.data != null ?? true;
|
isSave.value = props.data != null ?? true;
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
mainStore.rowsAdd = []
|
||||||
getListChannel();
|
getListChannel();
|
||||||
getOc();
|
getOc();
|
||||||
complainstStore.columns = columns.value;
|
|
||||||
complainstStore.visibleColumns = visibleColumns.value;
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="row col-12 bg-white">
|
<div class="row col-12 bg-white">
|
||||||
<div class="col-sm-12 col-md-9">
|
<div class="col-sm-12 col-md-9">
|
||||||
<div v-if="isSave === true" class="q-pa-sm q-gutter-sm">
|
<div v-if="isSave" class="q-pa-sm q-gutter-sm">
|
||||||
<q-banner
|
<q-banner
|
||||||
inline-actions
|
inline-actions
|
||||||
bordered
|
bordered
|
||||||
|
|
@ -470,9 +374,7 @@ onMounted(() => {
|
||||||
ref="respondentTypeRef"
|
ref="respondentTypeRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
:readonly="
|
:readonly="isReadonly"
|
||||||
formData.status !== 'NEW' && formData.status !== ''
|
|
||||||
"
|
|
||||||
label="ผู้ถูกร้องเรียน"
|
label="ผู้ถูกร้องเรียน"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
|
|
@ -509,9 +411,7 @@ onMounted(() => {
|
||||||
ref="organizationIdRef"
|
ref="organizationIdRef"
|
||||||
dense
|
dense
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:readonly="
|
:readonly="isReadonly"
|
||||||
formData.status !== 'NEW' && formData.status !== ''
|
|
||||||
"
|
|
||||||
outlined
|
outlined
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
|
|
@ -537,9 +437,7 @@ onMounted(() => {
|
||||||
label="หน่วยงานที่พิจารณา"
|
label="หน่วยงานที่พิจารณา"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
:readonly="
|
:readonly="isReadonly"
|
||||||
formData.status !== 'NEW' && formData.status !== ''
|
|
||||||
"
|
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
|
|
@ -574,9 +472,7 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
ผู้ถูกร้องเรียน
|
ผู้ถูกร้องเรียน
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="!isReadonly"
|
||||||
formData.status === 'NEW' || formData.status === ''
|
|
||||||
"
|
|
||||||
size="12px"
|
size="12px"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
|
|
@ -593,15 +489,17 @@ onMounted(() => {
|
||||||
<div class="col-xs-12 q-pa-sm">
|
<div class="col-xs-12 q-pa-sm">
|
||||||
<d-table
|
<d-table
|
||||||
ref="table"
|
ref="table"
|
||||||
:columns="complainstStore.columns"
|
:columns="mainStore.columnsRespondent"
|
||||||
:rows="complainstStore.rowsAdd"
|
:rows="mainStore.rowsAdd"
|
||||||
row-key="idcard"
|
row-key="idcard"
|
||||||
flat
|
flat
|
||||||
bordered
|
bordered
|
||||||
:paging="true"
|
:paging="true"
|
||||||
dense
|
dense
|
||||||
class="custom-header-table"
|
class="custom-header-table"
|
||||||
:visible-columns="complainstStore.visibleColumns"
|
:visible-columns="
|
||||||
|
mainStore.visibleColumnsRespondent
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
|
|
@ -651,10 +549,7 @@ onMounted(() => {
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="!isReadonly"
|
||||||
formData.status === 'NEW' ||
|
|
||||||
formData.status === ''
|
|
||||||
"
|
|
||||||
size="12px"
|
size="12px"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
|
|
@ -678,9 +573,7 @@ onMounted(() => {
|
||||||
ref="titleRef"
|
ref="titleRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
:readonly="
|
:readonly="isReadonly"
|
||||||
formData.status !== 'NEW' && formData.status !== ''
|
|
||||||
"
|
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
v-model="formData.title"
|
v-model="formData.title"
|
||||||
:rules="[(val) => !!val || 'กรุณาการข้อมูล']"
|
:rules="[(val) => !!val || 'กรุณาการข้อมูล']"
|
||||||
|
|
@ -698,9 +591,7 @@ onMounted(() => {
|
||||||
ref="descriptionRef"
|
ref="descriptionRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
:readonly="
|
:readonly="isReadonly"
|
||||||
formData.status !== 'NEW' && formData.status !== ''
|
|
||||||
"
|
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
v-model="formData.description"
|
v-model="formData.description"
|
||||||
:rules="[(val) => !!val || 'กรุณาการข้อมูล']"
|
:rules="[(val) => !!val || 'กรุณาการข้อมูล']"
|
||||||
|
|
@ -719,9 +610,7 @@ onMounted(() => {
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
autoApply
|
autoApply
|
||||||
borderless
|
borderless
|
||||||
:readonly="
|
:readonly="isReadonly"
|
||||||
formData.status !== 'NEW' && formData.status !== ''
|
|
||||||
"
|
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
@update:model-value="changeFormData()"
|
@update:model-value="changeFormData()"
|
||||||
|
|
@ -738,9 +627,7 @@ onMounted(() => {
|
||||||
ref="dateReceivedRef"
|
ref="dateReceivedRef"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
:readonly="
|
:readonly="isReadonly"
|
||||||
formData.status !== 'NEW' && formData.status !== ''
|
|
||||||
"
|
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="full-width datepicker"
|
class="full-width datepicker"
|
||||||
:model-value="
|
:model-value="
|
||||||
|
|
@ -773,11 +660,9 @@ onMounted(() => {
|
||||||
ref="levelConsiderationRef"
|
ref="levelConsiderationRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
:readonly="
|
:readonly="isReadonly"
|
||||||
formData.status !== 'NEW' && formData.status !== ''
|
|
||||||
"
|
|
||||||
v-model="formData.levelConsideration"
|
v-model="formData.levelConsideration"
|
||||||
:options="levelConsiderationtoptions"
|
:options="complainstStore.levelConsiderationtOptions"
|
||||||
label="ระดับการพิจารณา"
|
label="ระดับการพิจารณา"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
|
|
@ -801,9 +686,7 @@ onMounted(() => {
|
||||||
v-model="formData.dateConsideration"
|
v-model="formData.dateConsideration"
|
||||||
@update:model-value="changeFormData()"
|
@update:model-value="changeFormData()"
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
:readonly="
|
:readonly="isReadonly"
|
||||||
formData.status !== 'NEW' && formData.status !== ''
|
|
||||||
"
|
|
||||||
autoApply
|
autoApply
|
||||||
borderless
|
borderless
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
|
|
@ -827,9 +710,7 @@ onMounted(() => {
|
||||||
? date2Thai(formData.dateConsideration)
|
? date2Thai(formData.dateConsideration)
|
||||||
: null
|
: null
|
||||||
"
|
"
|
||||||
:readonly="
|
:readonly="isReadonly"
|
||||||
formData.status !== 'NEW' && formData.status !== ''
|
|
||||||
"
|
|
||||||
label="วันที่กำหนดวันพิจารณา"
|
label="วันที่กำหนดวันพิจารณา"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:rules="[
|
:rules="[
|
||||||
|
|
@ -857,11 +738,9 @@ onMounted(() => {
|
||||||
ref="offenseDetailsRef"
|
ref="offenseDetailsRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
:readonly="
|
:readonly="isReadonly"
|
||||||
formData.status !== 'NEW' && formData.status !== ''
|
|
||||||
"
|
|
||||||
v-model="formData.offenseDetails"
|
v-model="formData.offenseDetails"
|
||||||
:options="offenseDetailstoptions"
|
:options="mainStore.offenseDetailstOptions"
|
||||||
label="ลักษณะความผิด"
|
label="ลักษณะความผิด"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
|
|
@ -880,9 +759,7 @@ onMounted(() => {
|
||||||
v-model="formData.dateNotification"
|
v-model="formData.dateNotification"
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
autoApply
|
autoApply
|
||||||
:readonly="
|
:readonly="isReadonly"
|
||||||
formData.status !== 'NEW' && formData.status !== ''
|
|
||||||
"
|
|
||||||
borderless
|
borderless
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
|
|
@ -900,9 +777,7 @@ onMounted(() => {
|
||||||
ref="dateNotificationRef"
|
ref="dateNotificationRef"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
:readonly="
|
:readonly="isReadonly"
|
||||||
formData.status !== 'NEW' && formData.status !== ''
|
|
||||||
"
|
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="full-width datepicker"
|
class="full-width datepicker"
|
||||||
:model-value="
|
:model-value="
|
||||||
|
|
@ -935,12 +810,10 @@ onMounted(() => {
|
||||||
for="selectReceivecomplaints"
|
for="selectReceivecomplaints"
|
||||||
ref="complaintFromRef"
|
ref="complaintFromRef"
|
||||||
dense
|
dense
|
||||||
:readonly="
|
:readonly="isReadonly"
|
||||||
formData.status !== 'NEW' && formData.status !== ''
|
|
||||||
"
|
|
||||||
outlined
|
outlined
|
||||||
v-model="formData.complaintFrom"
|
v-model="formData.complaintFrom"
|
||||||
:options="complaintFromtoptions"
|
:options="channelOptions"
|
||||||
label="รับเรื่องร้องเรียน"
|
label="รับเรื่องร้องเรียน"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
|
|
@ -962,9 +835,7 @@ onMounted(() => {
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="formData.appellant"
|
v-model="formData.appellant"
|
||||||
:readonly="
|
:readonly="isReadonly"
|
||||||
formData.status !== 'NEW' && formData.status !== ''
|
|
||||||
"
|
|
||||||
label="ผู้ร้องเรียน"
|
label="ผู้ร้องเรียน"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกข้อมูล'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอกข้อมูล'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
|
@ -976,9 +847,7 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-12">
|
<div class="col-xs-12 col-sm-12">
|
||||||
<q-input
|
<q-input
|
||||||
:readonly="
|
:readonly="isReadonly"
|
||||||
formData.status !== 'NEW' && formData.status !== ''
|
|
||||||
"
|
|
||||||
for="result"
|
for="result"
|
||||||
ref="resultRef"
|
ref="resultRef"
|
||||||
dense
|
dense
|
||||||
|
|
@ -1001,10 +870,7 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<div
|
<div class="row col-12 q-pa-sm" v-if="!isReadonly">
|
||||||
class="row col-12 q-pa-sm"
|
|
||||||
v-if="formData.status === 'NEW' || formData.status === ''"
|
|
||||||
>
|
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-btn
|
<q-btn
|
||||||
for="ButtonOnSubmit"
|
for="ButtonOnSubmit"
|
||||||
|
|
@ -1029,22 +895,20 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<div class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
<div class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
||||||
{{
|
{{
|
||||||
formData.status === "NEW"
|
!isReadonly ? "อัปโหลดไฟล์เอกสารหลักฐาน" : "ไฟล์เอกสารหลักฐาน"
|
||||||
? "อัปโหลดไฟล์เอกสารหลักฐาน"
|
|
||||||
: "ไฟล์เอกสารหลักฐาน"
|
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
|
|
||||||
<div v-if="formData.status === 'NEW'" class="col-12 q-pa-sm row">
|
<div
|
||||||
|
v-if="!isReadonly && formData.id !== ''"
|
||||||
|
class="col-12 q-pa-sm row"
|
||||||
|
>
|
||||||
<q-file
|
<q-file
|
||||||
for="inputFiles"
|
for="inputFiles"
|
||||||
class="col-11"
|
class="col-11"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
:readonly="
|
|
||||||
formData.status !== 'NEW' && formData.status !== ''
|
|
||||||
"
|
|
||||||
v-model="formData.documentFile"
|
v-model="formData.documentFile"
|
||||||
@added="fileUploadDoc"
|
@added="fileUploadDoc"
|
||||||
label="ไฟล์เอกสารหลักฐาน"
|
label="ไฟล์เอกสารหลักฐาน"
|
||||||
|
|
@ -1094,7 +958,7 @@ onMounted(() => {
|
||||||
><q-tooltip>ดาวน์โหลดไฟล์</q-tooltip></q-btn
|
><q-tooltip>ดาวน์โหลดไฟล์</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="formData.status === 'NEW'"
|
v-if="!isReadonly"
|
||||||
size="12px"
|
size="12px"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
|
|
@ -1109,7 +973,7 @@ onMounted(() => {
|
||||||
</q-list>
|
</q-list>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 q-pa-sm" v-if="fileList.length == 0">
|
<div class="col-12 q-pa-sm" v-else>
|
||||||
<q-card class="q-pa-md" bordered> ไม่มีรายการเอกสาร </q-card>
|
<q-card class="q-pa-md" bordered> ไม่มีรายการเอกสาร </q-card>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
@ -1119,11 +983,12 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Popup ผู้ถูกร้องเรียน -->
|
||||||
<DialogAddPersonal
|
<DialogAddPersonal
|
||||||
title="ผู้ถูกร้องเรียน"
|
title="ผู้ถูกร้องเรียน"
|
||||||
:checkId="complainstStore.rowsAdd"
|
:checkId="mainStore.rowsAdd"
|
||||||
:modal="modal"
|
:modal="modal"
|
||||||
btn-title="เพิ่มรายชื่อผู้ถูกสอบสวน"
|
btn-title="เพิ่มรายชื่อผู้ถูกร้องเรียน"
|
||||||
:close="toggleModal"
|
:close="toggleModal"
|
||||||
:save="addPerson"
|
:save="addPerson"
|
||||||
@returnData="handleSave"
|
@returnData="handleSave"
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,6 @@ async function getList() {
|
||||||
|
|
||||||
/** ไปยังหน้าเพิ่มข้อมูล */
|
/** ไปยังหน้าเพิ่มข้อมูล */
|
||||||
function redirectToPageadd() {
|
function redirectToPageadd() {
|
||||||
complainstStore.fetchComplainstAdd([]);
|
|
||||||
router.push(`/discipline/complaints/add`);
|
router.push(`/discipline/complaints/add`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,12 @@
|
||||||
import { onMounted, reactive, ref, watch } from "vue";
|
import { onMounted, reactive, ref, watch } from "vue";
|
||||||
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
||||||
import FormInvestigatefacts from "@/modules/11_discipline/components/2_InvestigateFacts/Form.vue"; //สืบสวนข้อเท็จจริง
|
import FormInvestigatefacts from "@/modules/11_discipline/components/2_InvestigateFacts/Form.vue"; //สืบสวนข้อเท็จจริง
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
||||||
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import Popup from "@/modules/11_discipline/components/1_Complaint/Popup.vue";
|
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
||||||
import type { FormData } from "@/modules/11_discipline/interface/request/investigateFact";
|
import type { FormData } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||||
import type {
|
import type {
|
||||||
FormData as FormDataComplaint,
|
FormData as FormDataComplaint,
|
||||||
|
|
@ -18,13 +19,12 @@ import type { QTableProps } from "quasar";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
||||||
const investigateFactStore = useInvestigateFactStore();
|
const mainStore = useDisciplineMainStore();
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const store = useInvestigateFactStore();
|
const store = useInvestigateFactStore();
|
||||||
const { dialogConfirm, showLoader, success, hideLoader, messageError } = mixin;
|
const { dialogConfirm, showLoader, success, hideLoader, messageError } = mixin;
|
||||||
const router = useRouter();
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const id = ref<string>(route.params.id as string);
|
const id = ref<string>(route.params.id as string);
|
||||||
|
|
||||||
|
|
@ -40,10 +40,10 @@ const data = reactive<FormData>({
|
||||||
investigationDetailOther: "",
|
investigationDetailOther: "",
|
||||||
evidenceFiles: null,
|
evidenceFiles: null,
|
||||||
fileComplaint: null,
|
fileComplaint: null,
|
||||||
clickTime: false,
|
investigationExtendStatus: false,
|
||||||
investigationDateStart: null,
|
investigationDateStart: null,
|
||||||
investigationDateEnd: null,
|
investigationDateEnd: null,
|
||||||
daysExtend: null,
|
investigationDaysExtend: null,
|
||||||
investigationStatusResult: "",
|
investigationStatusResult: "",
|
||||||
investigationCauseText: "",
|
investigationCauseText: "",
|
||||||
complaintStatus: "",
|
complaintStatus: "",
|
||||||
|
|
@ -60,6 +60,7 @@ const data = reactive<FormData>({
|
||||||
|
|
||||||
/** ข้อมูล v-model ของฟอร์มเรื่องร้องเรียน */
|
/** ข้อมูล v-model ของฟอร์มเรื่องร้องเรียน */
|
||||||
const personObjComplaint = reactive<ArrayPerson>({
|
const personObjComplaint = reactive<ArrayPerson>({
|
||||||
|
id: "",
|
||||||
personId: "",
|
personId: "",
|
||||||
idcard: "",
|
idcard: "",
|
||||||
name: "",
|
name: "",
|
||||||
|
|
@ -132,104 +133,6 @@ async function getDataComplaint() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** หัวตาราง */
|
|
||||||
const columns = ref<QTableProps["columns"]>([
|
|
||||||
{
|
|
||||||
name: "info",
|
|
||||||
align: "left",
|
|
||||||
label: "",
|
|
||||||
sortable: false,
|
|
||||||
field: "info",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "no",
|
|
||||||
align: "left",
|
|
||||||
label: "ลำดับ",
|
|
||||||
sortable: false,
|
|
||||||
field: "no",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "idcard",
|
|
||||||
align: "left",
|
|
||||||
label: "เลขบัตรประชาชน",
|
|
||||||
sortable: true,
|
|
||||||
field: "idcard",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "name",
|
|
||||||
align: "left",
|
|
||||||
label: "ชื่อ - นามสกุล",
|
|
||||||
sortable: true,
|
|
||||||
field: "name",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "posNo",
|
|
||||||
align: "left",
|
|
||||||
label: "ตำแหน่งเลขที่",
|
|
||||||
sortable: true,
|
|
||||||
field: "posNo",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "position",
|
|
||||||
align: "left",
|
|
||||||
label: "ตำแหน่ง",
|
|
||||||
sortable: true,
|
|
||||||
field: "position",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "positionLevel",
|
|
||||||
align: "left",
|
|
||||||
label: "ระดับ",
|
|
||||||
sortable: true,
|
|
||||||
field: "positionLevel",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "salary",
|
|
||||||
align: "left",
|
|
||||||
label: "เงินเดือน",
|
|
||||||
sortable: true,
|
|
||||||
field: "salary",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "organization",
|
|
||||||
align: "left",
|
|
||||||
label: "หน่วยงาน",
|
|
||||||
sortable: true,
|
|
||||||
field: "organization",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
/** หัวข้อที่เเสดงในตาราง */
|
|
||||||
const visibleColumns = ref<string[]>([
|
|
||||||
"info",
|
|
||||||
"no",
|
|
||||||
"idcard",
|
|
||||||
"name",
|
|
||||||
"posNo",
|
|
||||||
"position",
|
|
||||||
"positionLevel",
|
|
||||||
"salary",
|
|
||||||
"organization",
|
|
||||||
]);
|
|
||||||
|
|
||||||
function getData() {
|
function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
|
|
@ -250,8 +153,11 @@ function getData() {
|
||||||
data.result = dataList.result;
|
data.result = dataList.result;
|
||||||
data.directors = dataList.director;
|
data.directors = dataList.director;
|
||||||
data.disciplineInvestigateDocs = dataList.disciplineInvestigateDocs;
|
data.disciplineInvestigateDocs = dataList.disciplineInvestigateDocs;
|
||||||
data.disciplineInvestigateRelevantDocs = dataList.disciplineInvestigateRelevantDocs;
|
data.disciplineInvestigateRelevantDocs =
|
||||||
|
dataList.disciplineInvestigateRelevantDocs;
|
||||||
data.investigationStatusResult = dataList.investigationStatusResult;
|
data.investigationStatusResult = dataList.investigationStatusResult;
|
||||||
|
data.investigationExtendStatus = dataList.investigationExtendStatus;
|
||||||
|
data.investigationDaysExtend = dataList.investigationDaysExtend;
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -378,7 +284,6 @@ function emitPerson(data: FormData[]) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getData();
|
getData();
|
||||||
|
|
@ -461,13 +366,13 @@ watch(
|
||||||
</q-tab-panels>
|
</q-tab-panels>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
<Popup
|
<PopupSendToNext
|
||||||
:modal="modalPopup"
|
:modal="modalPopup"
|
||||||
:close="closePopup"
|
:close="closePopup"
|
||||||
title="ส่งไปสอบสวน"
|
title="ส่งไปสอบสวน"
|
||||||
:rows="investigateFactStore.rowsAdd"
|
:rows="mainStore.rowsAdd"
|
||||||
:columns="columns"
|
:columns="mainStore.columnsDirector"
|
||||||
:visibleColumns="visibleColumns"
|
:visibleColumns="mainStore.visibleColumnsDirector"
|
||||||
@return-person="emitPerson"
|
@return-person="emitPerson"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -5,20 +5,18 @@ import { useRouter, useRoute } from "vue-router";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import Popup from "@/modules/11_discipline/components/1_Complaint/Popup.vue";
|
import DialogDirector from "@/modules/11_discipline/components/DialogDirector.vue";
|
||||||
/**import component*/
|
/**import component*/
|
||||||
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
||||||
import FormInvestigatefacts from "@/modules/11_discipline/components/2_InvestigateFacts/Form.vue"; //สืบสวนข้อเท็จจริง
|
import FormInvestigatefacts from "@/modules/11_discipline/components/2_InvestigateFacts/Form.vue"; //สืบสวนข้อเท็จจริง
|
||||||
import FormDisciplinary from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue"; // สอบสวนความผิดทางวินัย
|
import FormDisciplinary from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue"; // สอบสวนความผิดทางวินัย
|
||||||
import type {
|
import type { PersonsArray } from "@/modules/11_discipline/interface/request/disciplinary";
|
||||||
FormData,
|
|
||||||
PersonsArray,
|
|
||||||
} from "@/modules/11_discipline/interface/request/disciplinary";
|
|
||||||
import type {
|
import type {
|
||||||
FormData as FormDataComplaint,
|
FormData as FormDataComplaint,
|
||||||
ArrayPerson,
|
ArrayPerson,
|
||||||
ArrayFileList,
|
ArrayFileList,
|
||||||
} from "@/modules/11_discipline/interface/request/complaint";
|
} from "@/modules/11_discipline/interface/request/complaint";
|
||||||
|
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
||||||
|
|
||||||
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/investigateFact";
|
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||||
|
|
||||||
|
|
@ -38,6 +36,8 @@ const id = ref<string>(route.params.id as string);
|
||||||
const data = ref<object>();
|
const data = ref<object>();
|
||||||
const status = ref<string>("");
|
const status = ref<string>("");
|
||||||
|
|
||||||
|
const idInvestigate = ref<string>("");
|
||||||
|
const idComplaint = ref<string>("");
|
||||||
/** function fetchData สอบสวนความผิดทางวินัย*/
|
/** function fetchData สอบสวนความผิดทางวินัย*/
|
||||||
async function fetchDetailDisciplinary() {
|
async function fetchDetailDisciplinary() {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -46,6 +46,8 @@ async function fetchDetailDisciplinary() {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
data.value = res.data.result;
|
data.value = res.data.result;
|
||||||
status.value = res.data.result.status;
|
status.value = res.data.result.status;
|
||||||
|
idComplaint.value = res.data.result.idComplaint;
|
||||||
|
idInvestigate.value = res.data.result.idInvestigate;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -59,7 +61,7 @@ async function fetchDetailDisciplinary() {
|
||||||
async function fetchDetailInvestigate() {
|
async function fetchDetailInvestigate() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.disciplineInvestigateById(id.value))
|
.get(config.API.investigateById(idInvestigate.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const dataList = res.data.result;
|
const dataList = res.data.result;
|
||||||
dataInvestigatefacts.id = dataList.id;
|
dataInvestigatefacts.id = dataList.id;
|
||||||
|
|
@ -85,6 +87,9 @@ async function fetchDetailInvestigate() {
|
||||||
dataList.disciplineInvestigateRelevantDocs;
|
dataList.disciplineInvestigateRelevantDocs;
|
||||||
dataInvestigatefacts.investigationStatusResult =
|
dataInvestigatefacts.investigationStatusResult =
|
||||||
dataList.investigationStatusResult;
|
dataList.investigationStatusResult;
|
||||||
|
dataInvestigatefacts.investigationExtendStatus = dataList.investigationExtendStatus;
|
||||||
|
dataInvestigatefacts.investigationDaysExtend =
|
||||||
|
dataList.investigationDaysExtend;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -98,7 +103,7 @@ async function fetchDetailInvestigate() {
|
||||||
async function fetchDetailComplaints() {
|
async function fetchDetailComplaints() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.disciplineComplaintsById(id.value))
|
.get(config.API.complaintbyId(idComplaint.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const dataList = res.data.result;
|
const dataList = res.data.result;
|
||||||
dataComplaints.id = dataList.id;
|
dataComplaints.id = dataList.id;
|
||||||
|
|
@ -169,11 +174,16 @@ function sentIssue() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function sentIssueGate() {
|
function sentIssueGate() {
|
||||||
dialogConfirm($q, () => confirmSentIssueGate(),'ยืนยันส่งไปสรุปผลการพิจารณา','ต้องการยืนยันส่งไปสรุปผลการพิจารณาใช่หรือไม่?');
|
dialogConfirm(
|
||||||
|
$q,
|
||||||
|
() => confirmSentIssueGate(),
|
||||||
|
"ยืนยันส่งไปสรุปผลการพิจารณา",
|
||||||
|
"ต้องการยืนยันส่งไปสรุปผลการพิจารณาใช่หรือไม่?"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function confirmSentIssueGate() {
|
function confirmSentIssueGate() {
|
||||||
showLoader()
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.disciplinaryApprove(id.value))
|
.get(config.API.disciplinaryApprove(id.value))
|
||||||
.then((res) => {})
|
.then((res) => {})
|
||||||
|
|
@ -271,6 +281,7 @@ watch(
|
||||||
|
|
||||||
/** ข้อมูล v-model ของฟอร์มเรื่องร้องเรียน */
|
/** ข้อมูล v-model ของฟอร์มเรื่องร้องเรียน */
|
||||||
const personObjComplaint = reactive<ArrayPerson>({
|
const personObjComplaint = reactive<ArrayPerson>({
|
||||||
|
id: "",
|
||||||
personId: "",
|
personId: "",
|
||||||
idcard: "",
|
idcard: "",
|
||||||
name: "",
|
name: "",
|
||||||
|
|
@ -442,10 +453,10 @@ const dataInvestigatefacts = reactive<FormInvestigateFact>({
|
||||||
investigationDetailOther: "",
|
investigationDetailOther: "",
|
||||||
evidenceFiles: null,
|
evidenceFiles: null,
|
||||||
fileComplaint: null,
|
fileComplaint: null,
|
||||||
clickTime: false,
|
investigationExtendStatus: false,
|
||||||
investigationDateStart: null,
|
investigationDateStart: null,
|
||||||
investigationDateEnd: null,
|
investigationDateEnd: null,
|
||||||
daysExtend: null,
|
investigationDaysExtend: null,
|
||||||
investigationStatusResult: "",
|
investigationStatusResult: "",
|
||||||
investigationCauseText: "",
|
investigationCauseText: "",
|
||||||
complaintStatus: "",
|
complaintStatus: "",
|
||||||
|
|
@ -541,7 +552,7 @@ const dataInvestigatefacts = reactive<FormInvestigateFact>({
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Popup
|
<PopupSendToNext
|
||||||
:modal="modalPopup"
|
:modal="modalPopup"
|
||||||
:close="closePopup"
|
:close="closePopup"
|
||||||
title="ส่งไปพักราชการ"
|
title="ส่งไปพักราชการ"
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ import type { DataOptionRes } from "@/modules/11_discipline/interface/response/M
|
||||||
|
|
||||||
/** import components*/
|
/** import components*/
|
||||||
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
||||||
import Dialogbody from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Dialogbody.vue";
|
import DialogDirector from "@/modules/11_discipline/components/DialogDirector.vue";
|
||||||
import Table from "@/modules/11_discipline/components/3_InvestigateDisciplinary/DirectorTable.vue";
|
import Table from "@/modules/11_discipline/components/3_InvestigateDisciplinary/DirectorTable.vue";
|
||||||
import UploadFile from "@/modules/11_discipline/components/UploadFile.vue";
|
import UploadFile from "@/modules/11_discipline/components/UploadFile.vue";
|
||||||
|
|
||||||
|
|
@ -31,9 +31,12 @@ import UploadFile from "@/modules/11_discipline/components/UploadFile.vue";
|
||||||
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";
|
||||||
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
||||||
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store";
|
||||||
|
import { co } from "@fullcalendar/core/internal-common";
|
||||||
|
|
||||||
const complainstStore = useComplainstDataStore();
|
const complainstStore = useComplainstDataStore();
|
||||||
const investigateDis = useInvestigateDisStore();
|
const investigateDis = useInvestigateDisStore();
|
||||||
|
const mainStore = useDisciplineMainStore();
|
||||||
const { filterSelector } = complainstStore; // function จาก store complainstStore
|
const { filterSelector } = complainstStore; // function จาก store complainstStore
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, showLoader, hideLoader, dialogConfirm, messageError } =
|
const { date2Thai, showLoader, hideLoader, dialogConfirm, messageError } =
|
||||||
|
|
@ -52,95 +55,13 @@ const modalPerson = ref<boolean>(false);
|
||||||
/** search data table*/
|
/** search data table*/
|
||||||
const filter = ref<string>("");
|
const filter = ref<string>("");
|
||||||
|
|
||||||
|
const isSave = ref<boolean>(false); // มีการแก้ไขรอบันทึก
|
||||||
|
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
||||||
|
|
||||||
function toggleModal() {
|
function toggleModal() {
|
||||||
modalPerson.value = !modalPerson.value;
|
modalPerson.value = !modalPerson.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** หัวตารางของรายการผู้ถูกสอบสวน กรณีบุคคล */
|
|
||||||
const columnsPerson = ref<QTableProps["columns"]>([
|
|
||||||
{
|
|
||||||
name: "info",
|
|
||||||
align: "center",
|
|
||||||
label: "",
|
|
||||||
sortable: false,
|
|
||||||
field: "info",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "no",
|
|
||||||
align: "left",
|
|
||||||
label: "ลำดับ",
|
|
||||||
sortable: false,
|
|
||||||
field: "no",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "idcard",
|
|
||||||
align: "left",
|
|
||||||
label: "เลขบัตรประชาชน",
|
|
||||||
sortable: true,
|
|
||||||
field: "idcard",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "name",
|
|
||||||
align: "left",
|
|
||||||
label: "ชื่อ - นามสกุล",
|
|
||||||
sortable: true,
|
|
||||||
field: "name",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "posNo",
|
|
||||||
align: "left",
|
|
||||||
label: "ตำแหน่งเลขที่",
|
|
||||||
sortable: true,
|
|
||||||
field: "posNo",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "position",
|
|
||||||
align: "left",
|
|
||||||
label: "ตำแหน่ง",
|
|
||||||
sortable: true,
|
|
||||||
field: "position",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "positionLevel",
|
|
||||||
align: "left",
|
|
||||||
label: "ระดับ",
|
|
||||||
sortable: true,
|
|
||||||
field: "positionLevel",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "salary",
|
|
||||||
align: "left",
|
|
||||||
label: "เงินเดือน",
|
|
||||||
sortable: true,
|
|
||||||
field: "salary",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "organization",
|
|
||||||
align: "left",
|
|
||||||
label: "หน่วยงาน",
|
|
||||||
sortable: true,
|
|
||||||
field: "organization",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
/** formData*/
|
/** formData*/
|
||||||
const formData = reactive<FormData>({
|
const formData = reactive<FormData>({
|
||||||
respondentType: "",
|
respondentType: "",
|
||||||
|
|
@ -158,7 +79,7 @@ const formData = reactive<FormData>({
|
||||||
result: "", // ผลการสอบสวน
|
result: "", // ผลการสอบสวน
|
||||||
directors: [],
|
directors: [],
|
||||||
persons: [],
|
persons: [],
|
||||||
clickTime: false,
|
extendStatus: false,
|
||||||
disciplinaryDateStart: null, // วันที่เริ่มการสอบสวน
|
disciplinaryDateStart: null, // วันที่เริ่มการสอบสวน
|
||||||
disciplinaryDateEnd: null, // วันที่สิ้นสุดการสอบสวน
|
disciplinaryDateEnd: null, // วันที่สิ้นสุดการสอบสวน
|
||||||
daysExtend: 0,
|
daysExtend: 0,
|
||||||
|
|
@ -167,21 +88,6 @@ const formData = reactive<FormData>({
|
||||||
disciplinaryStatusResult: "",
|
disciplinaryStatusResult: "",
|
||||||
disciplinaryCauseText: "",
|
disciplinaryCauseText: "",
|
||||||
disciplinaryResult: "",
|
disciplinaryResult: "",
|
||||||
|
|
||||||
// detailComplaint: "",
|
|
||||||
// whereInvestigate: "",
|
|
||||||
// trueDetail: "",
|
|
||||||
// evidence: "",
|
|
||||||
// recordAccuser: "",
|
|
||||||
// witnesses: "",
|
|
||||||
// InvestResults: "",
|
|
||||||
// complaintStatus: "",
|
|
||||||
// filesEvidence: null,
|
|
||||||
// filesRecordAccuser: null,
|
|
||||||
// filesWitnesses: null,
|
|
||||||
// filesEtc: null,
|
|
||||||
// organizationId: "",
|
|
||||||
// consideredAgency: "",
|
|
||||||
});
|
});
|
||||||
const disciplineDisciplinary_DocRelevants = ref<FileLists[]>([]); // ยังไม่มีรอ api
|
const disciplineDisciplinary_DocRelevants = ref<FileLists[]>([]); // ยังไม่มีรอ api
|
||||||
const disciplineDisciplinary_DocSummaryEvidences = ref<FileLists[]>([]);
|
const disciplineDisciplinary_DocSummaryEvidences = ref<FileLists[]>([]);
|
||||||
|
|
@ -280,8 +186,7 @@ function validateForm() {
|
||||||
}
|
}
|
||||||
if (hasError.every((result) => result === true)) {
|
if (hasError.every((result) => result === true)) {
|
||||||
onSubmit();
|
onSubmit();
|
||||||
} else {
|
isSave.value = false;
|
||||||
console.log("ไม่ผ่าน ");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -306,8 +211,6 @@ function onSubmit() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
const dataList = formData.directors.map((item: any) => item.id);
|
|
||||||
formData.directors = dataList;
|
|
||||||
emit("submit:disciplinary", formData);
|
emit("submit:disciplinary", formData);
|
||||||
},
|
},
|
||||||
"ยืนยันการบันทึกข้อมูล",
|
"ยืนยันการบันทึกข้อมูล",
|
||||||
|
|
@ -315,14 +218,23 @@ function onSubmit() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ฟังชั่น delect */
|
/** ฟังชั่นลบข้อมูลกรรมการ */
|
||||||
async function deleteData(id: string) {
|
async function deleteDirector(id: string) {
|
||||||
console.log("delete");
|
changeFormData();
|
||||||
|
const dataRow = rows.value;
|
||||||
|
const updatedRows = dataRow.filter((item: any) => item.id !== id);
|
||||||
|
rows.value = updatedRows;
|
||||||
|
|
||||||
|
const dataList = updatedRows.map((item: any) => item.id);
|
||||||
|
formData.directors = dataList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** เรียกข้อมูลรายละเอียด*/
|
/** เรียกข้อมูลรายละเอียด*/
|
||||||
async function fetchDatadetail() {
|
async function fetchDatadetail() {
|
||||||
if (props.data) {
|
if (props.data) {
|
||||||
|
isReadonly.value = props.data.status != "NEW" ?? true;
|
||||||
|
isSave.value = false;
|
||||||
|
|
||||||
formData.respondentType = props.data.respondentType;
|
formData.respondentType = props.data.respondentType;
|
||||||
formData.organizationId = props.data.organizationId;
|
formData.organizationId = props.data.organizationId;
|
||||||
formData.consideredAgency = props.data.consideredAgency;
|
formData.consideredAgency = props.data.consideredAgency;
|
||||||
|
|
@ -337,7 +249,6 @@ async function fetchDatadetail() {
|
||||||
formData.disciplinaryRecordAccuser = props.data.disciplinaryRecordAccuser;
|
formData.disciplinaryRecordAccuser = props.data.disciplinaryRecordAccuser;
|
||||||
formData.disciplinaryWitnesses = props.data.disciplinaryWitnesses;
|
formData.disciplinaryWitnesses = props.data.disciplinaryWitnesses;
|
||||||
formData.result = props.data.result;
|
formData.result = props.data.result;
|
||||||
formData.directors = props.data.director ?? [];
|
|
||||||
formData.persons = props.data.persons ?? [];
|
formData.persons = props.data.persons ?? [];
|
||||||
formData.disciplinaryDateStart = props.data.disciplinaryDateStart ?? null;
|
formData.disciplinaryDateStart = props.data.disciplinaryDateStart ?? null;
|
||||||
formData.disciplinaryDateEnd = props.data.disciplinaryDateEnd ?? null;
|
formData.disciplinaryDateEnd = props.data.disciplinaryDateEnd ?? null;
|
||||||
|
|
@ -359,23 +270,25 @@ async function fetchDatadetail() {
|
||||||
|
|
||||||
investigateDis.rowSent = formData.persons;
|
investigateDis.rowSent = formData.persons;
|
||||||
|
|
||||||
|
formData.disciplinaryStatusResult = props.data.disciplinaryStatusResult;
|
||||||
|
formData.disciplinaryCauseText = props.data.disciplinaryCauseText;
|
||||||
|
formData.disciplinaryResult = props.data.disciplinaryResult;
|
||||||
|
|
||||||
/** MAP รายชื่อกรรมการ หน้าหลัก */
|
/** MAP รายชื่อกรรมการ หน้าหลัก */
|
||||||
let datalistDirector: responseType[] = formData.directors.map(
|
const dataMap = props.data.director.map((item: any) => ({
|
||||||
(e: directorType) => ({
|
id: item.directorId,
|
||||||
id: e.id,
|
name: `${item.prefix}${item.firstName} ${item.lastName}`,
|
||||||
directorId: e.directorId,
|
prefix: item.prefix,
|
||||||
name: `${e.prefix}${e.firstName} ${e.lastName}`,
|
firstName: item.firstName,
|
||||||
prefix: e.prefix,
|
lastName: item.lastName,
|
||||||
firstName: e.firstName,
|
position: item.position,
|
||||||
lastName: e.lastName,
|
email: item.email,
|
||||||
position: e.position ? e.position : "-",
|
phone: item.phone,
|
||||||
email: e.email ? e.email : "-",
|
}));
|
||||||
phone: e.phone ? e.phone : "-",
|
|
||||||
total: Number(e.total) ?? "-",
|
rows.value = dataMap;
|
||||||
duty: e.duty ? e.duty : "-",
|
const dataList = dataMap.map((item: any) => item.id);
|
||||||
})
|
formData.directors = dataList;
|
||||||
);
|
|
||||||
rows.value = datalistDirector;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -518,6 +431,11 @@ async function selectComplainant(val: string) {
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** ฟังก์ชั่นเช็คการแก้ไขฟอร์มแล้วไม่ได้กดบันทึก */
|
||||||
|
function changeFormData() {
|
||||||
|
isSave.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
/** Hook */
|
/** Hook */
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fetchOrganization();
|
await fetchOrganization();
|
||||||
|
|
@ -652,7 +570,7 @@ onMounted(async () => {
|
||||||
<div class="col-xs-12 q-pa-sm">
|
<div class="col-xs-12 q-pa-sm">
|
||||||
<d-table
|
<d-table
|
||||||
ref="table"
|
ref="table"
|
||||||
:columns="columnsPerson"
|
:columns="mainStore.columnsRespondent"
|
||||||
:rows="formData.persons"
|
:rows="formData.persons"
|
||||||
row-key="personId"
|
row-key="personId"
|
||||||
flat
|
flat
|
||||||
|
|
@ -730,16 +648,16 @@ onMounted(async () => {
|
||||||
class="col-xs-12 col-sm-12 text-weight-medium bg-grey-1 q-py-sm q-px-md"
|
class="col-xs-12 col-sm-12 text-weight-medium bg-grey-1 q-py-sm q-px-md"
|
||||||
>
|
>
|
||||||
วันที่สอบสวน
|
วันที่สอบสวน
|
||||||
<!-- v-if="
|
|
||||||
props.data.disciplinaryDateStart &&
|
|
||||||
props.data.disciplinaryDateStart != null &&
|
|
||||||
props.data.disciplinaryDateEnd != null
|
|
||||||
" -->
|
|
||||||
|
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
for="#clickTime"
|
v-if="
|
||||||
|
formData.disciplinaryDateStart != null &&
|
||||||
|
formData.disciplinaryDateEnd != null &&
|
||||||
|
((isReadonly && formData.extendStatus) || !isReadonly)
|
||||||
|
"
|
||||||
|
for="#extendStatus"
|
||||||
size="md"
|
size="md"
|
||||||
v-model="formData.clickTime"
|
v-model="formData.extendStatus"
|
||||||
label="ขยายเวลา"
|
label="ขยายเวลา"
|
||||||
color="primary"
|
color="primary"
|
||||||
dense
|
dense
|
||||||
|
|
@ -750,7 +668,7 @@ onMounted(async () => {
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div class="q-pa-sm">
|
<div class="q-pa-sm">
|
||||||
<div class="q-col-gutter-sm row">
|
<div class="q-col-gutter-sm row">
|
||||||
<div class="col-3" v-if="!formData.clickTime">
|
<div class="col-3" v-if="!formData.extendStatus">
|
||||||
<datepicker
|
<datepicker
|
||||||
menu-class-name="modalfix"
|
menu-class-name="modalfix"
|
||||||
:readonly="isUpdate"
|
:readonly="isUpdate"
|
||||||
|
|
@ -802,7 +720,7 @@ onMounted(async () => {
|
||||||
</datepicker>
|
</datepicker>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-3" v-if="formData.clickTime">
|
<div class="col-3" v-if="formData.extendStatus">
|
||||||
<q-selectinvestigateDis
|
<q-selectinvestigateDis
|
||||||
for="#daysExtend"
|
for="#daysExtend"
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -817,7 +735,7 @@ onMounted(async () => {
|
||||||
map-options
|
map-options
|
||||||
:rules="[
|
:rules="[
|
||||||
(val: any) =>
|
(val: any) =>
|
||||||
formData.clickTime
|
formData.extendStatus
|
||||||
? !!val || 'กรุณาเลือกจำนวนวันที่ต้องการขยาย'
|
? !!val || 'กรุณาเลือกจำนวนวันที่ต้องการขยาย'
|
||||||
: true,
|
: true,
|
||||||
]"
|
]"
|
||||||
|
|
@ -1147,8 +1065,8 @@ onMounted(async () => {
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
color="red"
|
color="red"
|
||||||
@click="deleteData(props.row.id)"
|
@click="deleteDirector(props.row.id)"
|
||||||
icon="mdi-delete"
|
icon="mdi-delete-outline"
|
||||||
>
|
>
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
@ -1305,7 +1223,7 @@ onMounted(async () => {
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) => !!val || `${'กรุณาเลือกผลการสอบสวน'}`,
|
(val) => !!val || `${'กรุณาเลือกผลการสอบสวน'}`,
|
||||||
]"
|
]"
|
||||||
:options="investigateDis.offenseDetailsOps"
|
:options="mainStore.statusResultOptions"
|
||||||
label="ผลการสอบสวน"
|
label="ผลการสอบสวน"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
|
|
@ -1454,7 +1372,7 @@ onMounted(async () => {
|
||||||
@returnData="handleSave"
|
@returnData="handleSave"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Dialogbody
|
<DialogDirector
|
||||||
v-model:Modal="modal"
|
v-model:Modal="modal"
|
||||||
:clickClose="clickClose"
|
:clickClose="clickClose"
|
||||||
:rows2="listDirector"
|
:rows2="listDirector"
|
||||||
|
|
@ -1464,6 +1382,7 @@ onMounted(async () => {
|
||||||
:rowsPerPage="rowsPerPage"
|
:rowsPerPage="rowsPerPage"
|
||||||
:page="page"
|
:page="page"
|
||||||
:maxPage="maxPage"
|
:maxPage="maxPage"
|
||||||
|
:selected-row="rows"
|
||||||
@update:pagination="updatePaging"
|
@update:pagination="updatePaging"
|
||||||
@returnDirector="returnDirector"
|
@returnDirector="returnDirector"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ const dataInvestigatefacts = reactive<FormInvestigateFact>({
|
||||||
investigationDetailOther: "",
|
investigationDetailOther: "",
|
||||||
evidenceFiles: null,
|
evidenceFiles: null,
|
||||||
fileComplaint: null,
|
fileComplaint: null,
|
||||||
clickTime: false,
|
extendStatus: false,
|
||||||
investigationDateStart: null,
|
investigationDateStart: null,
|
||||||
investigationDateEnd: null,
|
investigationDateEnd: null,
|
||||||
daysExtend: null,
|
daysExtend: null,
|
||||||
|
|
@ -172,6 +172,7 @@ async function fetchDetailInvestigate() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const personObjComplaint = reactive<ArrayPerson>({
|
const personObjComplaint = reactive<ArrayPerson>({
|
||||||
|
id: "",
|
||||||
personId: "",
|
personId: "",
|
||||||
idcard: "",
|
idcard: "",
|
||||||
name: "",
|
name: "",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,12 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, watchEffect, watch, onMounted } from "vue";
|
import {
|
||||||
|
ref,
|
||||||
|
computed,
|
||||||
|
watchEffect,
|
||||||
|
watch,
|
||||||
|
onMounted,
|
||||||
|
type PropType,
|
||||||
|
} from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
@ -110,6 +117,10 @@ const props = defineProps({
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => "",
|
default: () => "",
|
||||||
},
|
},
|
||||||
|
selectedRow: {
|
||||||
|
type: Array as PropType<directorType[]>,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const checkSelected = computed(() => {
|
const checkSelected = computed(() => {
|
||||||
|
|
@ -118,18 +129,8 @@ const checkSelected = computed(() => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/** popup ยืนยันส่งัว */
|
/** เลือกกรรมการ */
|
||||||
function saveDirector() {
|
async function directorSave() {
|
||||||
dialogConfirm(
|
|
||||||
$q,
|
|
||||||
() => DirectorSave(),
|
|
||||||
"ยืนยันเพิ่มรายชื่อกรรมการ",
|
|
||||||
"ต้องการยืนยันเพิ่มรายชื่อกรรมการ?"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ส่งไปออกคำสั่ง */
|
|
||||||
async function DirectorSave() {
|
|
||||||
emit("returnDirector", selected.value);
|
emit("returnDirector", selected.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -152,7 +153,7 @@ function Reset() {
|
||||||
/** เช็คค่า props.Modal === true */
|
/** เช็คค่า props.Modal === true */
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
if (props.Modal === true) {
|
if (props.Modal === true) {
|
||||||
// selected.value = [];
|
selected.value = props.selectedRow;
|
||||||
props.getList();
|
props.getList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -184,6 +185,7 @@ watch(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<q-dialog v-model="props.Modal">
|
<q-dialog v-model="props.Modal">
|
||||||
<q-card style="width: 1200px; max-width: 80vw">
|
<q-card style="width: 1200px; max-width: 80vw">
|
||||||
|
|
@ -259,7 +261,7 @@ watch(
|
||||||
<q-card-actions align="right" class="bg-white text-teal">
|
<q-card-actions align="right" class="bg-white text-teal">
|
||||||
<q-btn
|
<q-btn
|
||||||
label="เพิ่มรายชื่อกรรมการ"
|
label="เพิ่มรายชื่อกรรมการ"
|
||||||
@click="saveDirector"
|
@click="directorSave"
|
||||||
:disable="checkSelected"
|
:disable="checkSelected"
|
||||||
color="public"
|
color="public"
|
||||||
/>
|
/>
|
||||||
|
|
@ -3,16 +3,13 @@ import { ref, watch } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
||||||
const complainstStore = useComplainstDataStore();
|
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
||||||
const { dialogConfirm, dialogMessageNotify, success } = mixin;
|
const { dialogConfirm } = mixin;
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
title: {
|
title: {
|
||||||
|
|
@ -63,8 +60,7 @@ function onclickSend() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
success($q, `ส่งข้อมูล${props.title}สำเร็จ`);
|
// success($q, `ส่งข้อมูล${props.title}สำเร็จ`);
|
||||||
console.log(selected.value);
|
|
||||||
emit("returnPerson", selected.value);
|
emit("returnPerson", selected.value);
|
||||||
props.close?.();
|
props.close?.();
|
||||||
},
|
},
|
||||||
|
|
@ -20,6 +20,7 @@ interface FormData {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ArrayPerson {
|
interface ArrayPerson {
|
||||||
|
id: string
|
||||||
personId:string
|
personId:string
|
||||||
idcard:string
|
idcard:string
|
||||||
name:string
|
name:string
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ interface FormData {
|
||||||
result: string;
|
result: string;
|
||||||
directors: Director[];
|
directors: Director[];
|
||||||
persons: Persons[];
|
persons: Persons[];
|
||||||
clickTime: boolean;
|
extendStatus: boolean;
|
||||||
disciplinaryDateStart: Date | null;
|
disciplinaryDateStart: Date | null;
|
||||||
disciplinaryDateEnd: Date | null;
|
disciplinaryDateEnd: Date | null;
|
||||||
daysExtend: number;
|
daysExtend: number;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ interface FormData {
|
||||||
other: string;
|
other: string;
|
||||||
evidenceFiles: File | null;
|
evidenceFiles: File | null;
|
||||||
fileComplaint: File | null;
|
fileComplaint: File | null;
|
||||||
clickTime: boolean;
|
extendStatus: boolean;
|
||||||
date: Date | null;
|
date: Date | null;
|
||||||
dateEnd: Date;
|
dateEnd: Date;
|
||||||
daysExtend: number | null;
|
daysExtend: number | null;
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,10 @@ interface FormData {
|
||||||
investigationDetailOther: string;
|
investigationDetailOther: string;
|
||||||
evidenceFiles: any | null;
|
evidenceFiles: any | null;
|
||||||
fileComplaint: File | null;
|
fileComplaint: File | null;
|
||||||
clickTime: boolean;
|
investigationExtendStatus: boolean | null;
|
||||||
investigationDateStart: Date | null;
|
investigationDateStart: Date | null;
|
||||||
investigationDateEnd: Date|null;
|
investigationDateEnd: Date|null;
|
||||||
daysExtend: number | null;
|
investigationDaysExtend: number | null;
|
||||||
investigationStatusResult: string;
|
investigationStatusResult: string;
|
||||||
investigationCauseText: string;
|
investigationCauseText: string;
|
||||||
complaintStatus:string
|
complaintStatus:string
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,22 @@
|
||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
|
import type { QTableProps } from "quasar";
|
||||||
|
import { ref } from "vue";
|
||||||
|
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
||||||
|
import type { ArrayPerson } from "@/modules/11_discipline/interface/response/investigate";
|
||||||
|
|
||||||
export const useStoreResultMain = defineStore("resultMain", () => {
|
export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
||||||
/** function ผู้ถูกสอบสวน*/
|
/** option ผู้ถูกสอบสวน*/
|
||||||
function convertRespondentType(val: string) {
|
const complainantoptionsMain = ref<DataOption[]>([
|
||||||
switch (val) {
|
{ id: "PERSON", name: "บุคคล" },
|
||||||
case "PERSON":
|
{ id: "ORGANIZATION", name: "หน่วยงาน" },
|
||||||
return "บุคคล";
|
{ id: "BANGKOK", name: "กรุงเทพมหานคร" },
|
||||||
case "ORGANIZATION":
|
]);
|
||||||
return "หน่วยงาน";
|
|
||||||
case "BANGKOK":
|
function convertComplaintType(val: string) {
|
||||||
return "กรุงเทพมหานคร";
|
const result = complainantoptionsMain.value.find(
|
||||||
}
|
(x: any) => x.id == val
|
||||||
|
)?.name;
|
||||||
|
return result ? result : "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** function ลักษณะความผิด*/
|
/** function ลักษณะความผิด*/
|
||||||
|
|
@ -27,7 +33,7 @@ export const useStoreResultMain = defineStore("resultMain", () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** function ลักษณะความผิด*/
|
/** function สถานะ*/
|
||||||
function convertStatus(val: string) {
|
function convertStatus(val: string) {
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case "NEW":
|
case "NEW":
|
||||||
|
|
@ -40,5 +46,256 @@ export const useStoreResultMain = defineStore("resultMain", () => {
|
||||||
return "ส่งไปสรุปผลการพิจารณาทางวินัย";
|
return "ส่งไปสรุปผลการพิจารณาทางวินัย";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return { convertRespondentType, convertFault, convertStatus };
|
|
||||||
|
/** option ลักษณะความผิด */
|
||||||
|
const offenseDetailstOptions = ref<DataOption[]>([
|
||||||
|
{ id: "NOT_SPECIFIED", name: "ยังไม่ระบุ" },
|
||||||
|
{ id: "NOT_DEADLY", name: "ไม่ร้ายแรง" },
|
||||||
|
{ id: "DEADLY", name: "ร้ายแรง" },
|
||||||
|
]);
|
||||||
|
|
||||||
|
function convertOffenseDetailst(val: string) {
|
||||||
|
return (
|
||||||
|
offenseDetailstOptions.value.find((x: any) => x.id == val)?.name ?? "-"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const statusResultOptions = ref<DataOption[]>([
|
||||||
|
{ id: "NOT_SPECIFIED", name: "ยังไม่ระบุ" },
|
||||||
|
{ id: "HAVE_CAUSE", name: "มีมูล" },
|
||||||
|
{ id: "NO_CAUSE", name: "ไม่มีมูล" },
|
||||||
|
]);
|
||||||
|
function convertStatusResult(val: string) {
|
||||||
|
const result = statusResultOptions.value.find(
|
||||||
|
(x: any) => x.id == val
|
||||||
|
)?.name;
|
||||||
|
return result ? result : "-";
|
||||||
|
}
|
||||||
|
|
||||||
|
const causeTextOptions = ref<DataOption[]>([
|
||||||
|
{ id: "ร้ายแรง", name: "ร้ายแรง" },
|
||||||
|
{ id: "ไม่ร้ายแรง", name: "ไม่ร้ายแรง" },
|
||||||
|
]);
|
||||||
|
|
||||||
|
/** หัวตารางผู้ถูกร้องเรียน */
|
||||||
|
const columnsRespondent = ref<QTableProps["columns"]>([
|
||||||
|
{
|
||||||
|
name: "info",
|
||||||
|
align: "left",
|
||||||
|
label: "",
|
||||||
|
sortable: false,
|
||||||
|
field: "info",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "no",
|
||||||
|
align: "left",
|
||||||
|
label: "ลำดับ",
|
||||||
|
sortable: false,
|
||||||
|
field: "no",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "idcard",
|
||||||
|
align: "left",
|
||||||
|
label: "เลขบัตรประชาชน",
|
||||||
|
sortable: true,
|
||||||
|
field: "idcard",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "name",
|
||||||
|
align: "left",
|
||||||
|
label: "ชื่อ - นามสกุล",
|
||||||
|
sortable: true,
|
||||||
|
field: "name",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "posNo",
|
||||||
|
align: "left",
|
||||||
|
label: "ตำแหน่งเลขที่",
|
||||||
|
sortable: true,
|
||||||
|
field: "posNo",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "position",
|
||||||
|
align: "left",
|
||||||
|
label: "ตำแหน่ง",
|
||||||
|
sortable: true,
|
||||||
|
field: "position",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "positionLevel",
|
||||||
|
align: "left",
|
||||||
|
label: "ระดับ",
|
||||||
|
sortable: true,
|
||||||
|
field: "positionLevel",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "salary",
|
||||||
|
align: "left",
|
||||||
|
label: "เงินเดือน",
|
||||||
|
sortable: true,
|
||||||
|
field: "salary",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "organization",
|
||||||
|
align: "left",
|
||||||
|
label: "หน่วยงาน",
|
||||||
|
sortable: true,
|
||||||
|
field: "organization",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
/** หัวข้อที่เเสดงในตารางผู้ถูกร้องเรียน */
|
||||||
|
const visibleColumnsRespondent = ref<string[]>([
|
||||||
|
"info",
|
||||||
|
"no",
|
||||||
|
"idcard",
|
||||||
|
"name",
|
||||||
|
"posNo",
|
||||||
|
"position",
|
||||||
|
"positionLevel",
|
||||||
|
"salary",
|
||||||
|
"organization",
|
||||||
|
]);
|
||||||
|
|
||||||
|
/** หัวตารางกรรมการ */
|
||||||
|
const columnsDirector = ref<QTableProps["columns"]>([
|
||||||
|
{
|
||||||
|
name: "info",
|
||||||
|
align: "left",
|
||||||
|
label: "",
|
||||||
|
sortable: false,
|
||||||
|
field: "info",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "no",
|
||||||
|
align: "left",
|
||||||
|
label: "ลำดับ",
|
||||||
|
sortable: false,
|
||||||
|
field: "no",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "idcard",
|
||||||
|
align: "left",
|
||||||
|
label: "เลขบัตรประชาชน",
|
||||||
|
sortable: true,
|
||||||
|
field: "idcard",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "name",
|
||||||
|
align: "left",
|
||||||
|
label: "ชื่อ - นามสกุล",
|
||||||
|
sortable: true,
|
||||||
|
field: "name",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "posNo",
|
||||||
|
align: "left",
|
||||||
|
label: "ตำแหน่งเลขที่",
|
||||||
|
sortable: true,
|
||||||
|
field: "posNo",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "position",
|
||||||
|
align: "left",
|
||||||
|
label: "ตำแหน่ง",
|
||||||
|
sortable: true,
|
||||||
|
field: "position",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "positionLevel",
|
||||||
|
align: "left",
|
||||||
|
label: "ระดับ",
|
||||||
|
sortable: true,
|
||||||
|
field: "positionLevel",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "salary",
|
||||||
|
align: "left",
|
||||||
|
label: "เงินเดือน",
|
||||||
|
sortable: true,
|
||||||
|
field: "salary",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "organization",
|
||||||
|
align: "left",
|
||||||
|
label: "หน่วยงาน",
|
||||||
|
sortable: true,
|
||||||
|
field: "organization",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
/** หัวข้อที่เเสดงในตารางกรรมการ */
|
||||||
|
const visibleColumnsDirector = ref<string[]>([
|
||||||
|
"info",
|
||||||
|
"no",
|
||||||
|
"idcard",
|
||||||
|
"name",
|
||||||
|
"posNo",
|
||||||
|
"position",
|
||||||
|
"positionLevel",
|
||||||
|
"salary",
|
||||||
|
"organization",
|
||||||
|
]);
|
||||||
|
|
||||||
|
const rowsAdd = ref<ArrayPerson[]>([]);
|
||||||
|
function fetchData(data: ArrayPerson[]) {
|
||||||
|
rowsAdd.value = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
complainantoptionsMain,
|
||||||
|
convertFault,
|
||||||
|
convertStatus,
|
||||||
|
columnsRespondent,
|
||||||
|
visibleColumnsRespondent,
|
||||||
|
offenseDetailstOptions,
|
||||||
|
convertOffenseDetailst,
|
||||||
|
convertComplaintType,
|
||||||
|
|
||||||
|
columnsDirector,
|
||||||
|
visibleColumnsDirector,
|
||||||
|
rowsAdd,
|
||||||
|
fetchData,
|
||||||
|
|
||||||
|
statusResultOptions,
|
||||||
|
convertStatusResult,
|
||||||
|
|
||||||
|
causeTextOptions
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,12 @@ import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
||||||
import type {
|
import type {
|
||||||
DataList,
|
DataList,
|
||||||
DataListRow,
|
DataListRow,
|
||||||
DataAdd,
|
|
||||||
ocListType,
|
ocListType,
|
||||||
} from "@/modules/11_discipline/interface/response/complaint";
|
} from "@/modules/11_discipline/interface/response/complaint";
|
||||||
import type { ArrayPerson } from "@/modules/11_discipline/interface/request/complaint";
|
import type { ArrayPerson } from "@/modules/11_discipline/interface/request/complaint";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store";
|
||||||
|
const mainStore = useDisciplineMainStore();
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai } = mixin;
|
const { date2Thai } = mixin;
|
||||||
|
|
@ -19,27 +20,17 @@ export const useComplainstDataStore = defineStore(
|
||||||
"DisciplineComplainst",
|
"DisciplineComplainst",
|
||||||
() => {
|
() => {
|
||||||
const rows = ref<DataListRow[]>([]);
|
const rows = ref<DataListRow[]>([]);
|
||||||
const rowsAdd = ref<ArrayPerson[]>([]);
|
|
||||||
const visibleColumns = ref<string[]>([]);
|
const visibleColumns = ref<string[]>([]);
|
||||||
const columns = ref<QTableProps["columns"]>([]);
|
const columns = ref<QTableProps["columns"]>([]);
|
||||||
|
|
||||||
function fetchComplainstAdd(data: ArrayPerson[]) {
|
|
||||||
rowsAdd.value = data;
|
|
||||||
}
|
|
||||||
|
|
||||||
function addCommas(salaryString: string): string {
|
|
||||||
const salaryNumber = parseFloat(salaryString.replace(/,/g, ""));
|
|
||||||
return salaryNumber.toLocaleString();
|
|
||||||
}
|
|
||||||
|
|
||||||
function fetchComplainst(data: DataList[]) {
|
function fetchComplainst(data: DataList[]) {
|
||||||
let dataList: DataListRow[] = data.map((e: DataList) => ({
|
let dataList: DataListRow[] = data.map((e: DataList) => ({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
personId: e.personId,
|
personId: e.personId,
|
||||||
title: e.title,
|
title: e.title,
|
||||||
dateReceived: e.dateReceived ? date2Thai(e.dateReceived) : "-",
|
dateReceived: e.dateReceived ? date2Thai(e.dateReceived) : "-",
|
||||||
respondentType: convertComplaintType(e.respondentType),
|
respondentType: mainStore.convertComplaintType(e.respondentType),
|
||||||
offenseDetails: offenseDetailsTran(e.offenseDetails),
|
offenseDetails: mainStore.convertOffenseDetailst(e.offenseDetails),
|
||||||
createdAt: date2Thai(e.createdAt)!,
|
createdAt: date2Thai(e.createdAt)!,
|
||||||
levelConsideration: levelConsiderationTran(e.levelConsideration),
|
levelConsideration: levelConsiderationTran(e.levelConsideration),
|
||||||
dateConsideration: e.dateConsideration
|
dateConsideration: e.dateConsideration
|
||||||
|
|
@ -50,21 +41,9 @@ export const useComplainstDataStore = defineStore(
|
||||||
rows.value = dataList;
|
rows.value = dataList;
|
||||||
}
|
}
|
||||||
|
|
||||||
// filter options
|
const complainantoptions = ref<DataOption[]>(
|
||||||
const complainantoptionsMain = ref<DataOption[]>([
|
mainStore.complainantoptionsMain
|
||||||
{ id: "PERSON", name: "บุคคล" },
|
);
|
||||||
{ id: "ORGANIZATION", name: "หน่วยงาน" },
|
|
||||||
{ id: "BANGKOK", name: "กรุงเทพมหานคร" },
|
|
||||||
]);
|
|
||||||
|
|
||||||
function convertComplaintType(val: string) {
|
|
||||||
const result = complainantoptionsMain.value.find(
|
|
||||||
(x: any) => x.id == val
|
|
||||||
)?.name;
|
|
||||||
return result ? result : "-";
|
|
||||||
}
|
|
||||||
|
|
||||||
const complainantoptions = ref<DataOption[]>(complainantoptionsMain.value);
|
|
||||||
const consideredAgencytoptions = ref<DataOption[]>([]);
|
const consideredAgencytoptions = ref<DataOption[]>([]);
|
||||||
const organizationIdOp = ref<DataOption[]>([]);
|
const organizationIdOp = ref<DataOption[]>([]);
|
||||||
|
|
||||||
|
|
@ -81,29 +60,17 @@ export const useComplainstDataStore = defineStore(
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function offenseDetailsTran(val: string) {
|
const levelConsiderationtOptions = ref<DataOption[]>([
|
||||||
switch (val) {
|
{ id: "NORMAL", name: "ปกติ" },
|
||||||
case "NOT_SPECIFIED":
|
{ id: "URGENT", name: "ด่วน" },
|
||||||
return "ยังไม่ระบุ";
|
{ id: "VERY_URGENT", name: "ด่วนมาก" },
|
||||||
case "NOT_DEADLY":
|
]);
|
||||||
return "ร้ายแรง";
|
|
||||||
case "DEADLY":
|
|
||||||
return "ไม่ร้ายแรง";
|
|
||||||
default:
|
|
||||||
return "-";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function levelConsiderationTran(val: string) {
|
function levelConsiderationTran(val: string) {
|
||||||
switch (val) {
|
return (
|
||||||
case "NORMAL":
|
levelConsiderationtOptions.value.find((v: any) => v.id === val)?.name ??
|
||||||
return "ปกติ";
|
"-"
|
||||||
case "URGENT":
|
);
|
||||||
return "ด่วน";
|
|
||||||
case "VERT_URGENT":
|
|
||||||
return "ด่วนมาก";
|
|
||||||
default:
|
|
||||||
return "-";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const agencytoptions = ref<DataOption[]>(consideredAgencytoptions.value);
|
const agencytoptions = ref<DataOption[]>(consideredAgencytoptions.value);
|
||||||
|
|
@ -119,7 +86,7 @@ export const useComplainstDataStore = defineStore(
|
||||||
update(() => {
|
update(() => {
|
||||||
const needle = val.toLowerCase();
|
const needle = val.toLowerCase();
|
||||||
if (type === "filterrespondentType") {
|
if (type === "filterrespondentType") {
|
||||||
complainantoptions.value = complainantoptionsMain.value.filter(
|
complainantoptions.value = mainStore.complainantoptionsMain.filter(
|
||||||
(v: any) => v.name.toLowerCase().indexOf(needle) > -1
|
(v: any) => v.name.toLowerCase().indexOf(needle) > -1
|
||||||
);
|
);
|
||||||
} else if (type === "filteragencytoptions") {
|
} else if (type === "filteragencytoptions") {
|
||||||
|
|
@ -144,7 +111,6 @@ export const useComplainstDataStore = defineStore(
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
rows,
|
rows,
|
||||||
rowsAdd,
|
|
||||||
visibleColumns,
|
visibleColumns,
|
||||||
columns,
|
columns,
|
||||||
fetchComplainst,
|
fetchComplainst,
|
||||||
|
|
@ -153,9 +119,9 @@ export const useComplainstDataStore = defineStore(
|
||||||
complainantoptions,
|
complainantoptions,
|
||||||
consideredAgencytoptions,
|
consideredAgencytoptions,
|
||||||
optionListName,
|
optionListName,
|
||||||
fetchComplainstAdd,
|
|
||||||
organizationIdOp,
|
organizationIdOp,
|
||||||
ocListFn,
|
ocListFn,
|
||||||
|
levelConsiderationtOptions,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,12 @@ import type {
|
||||||
DataOption,
|
DataOption,
|
||||||
DataNumberOption,
|
DataNumberOption,
|
||||||
} from "@/modules/11_discipline/interface/index/Main";
|
} from "@/modules/11_discipline/interface/index/Main";
|
||||||
import type { ListData, ArrayPerson, ocListType } from "@/modules/11_discipline/interface/response/investigate";
|
import type {
|
||||||
|
ListData,
|
||||||
|
ocListType,
|
||||||
|
} from "@/modules/11_discipline/interface/response/investigate";
|
||||||
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store";
|
||||||
|
const mainStore = useDisciplineMainStore();
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai } = mixin;
|
const { date2Thai } = mixin;
|
||||||
|
|
@ -17,11 +22,10 @@ const consideredAgencytoptions = ref<DataOption[]>([]);
|
||||||
function ocListFn(data: ocListType[]) {
|
function ocListFn(data: ocListType[]) {
|
||||||
let dataList: DataOption[] = data.map((item: ocListType) => ({
|
let dataList: DataOption[] = data.map((item: ocListType) => ({
|
||||||
id: item.organizationId,
|
id: item.organizationId,
|
||||||
name: item.organizationName
|
name: item.organizationName,
|
||||||
}))
|
}));
|
||||||
consideredAgencytoptions.value = dataList
|
consideredAgencytoptions.value = dataList;
|
||||||
organizationIdOp.value = dataList
|
organizationIdOp.value = dataList;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*** store ของข้อมูลสืบสวนข้อเท็จจริง */
|
/*** store ของข้อมูลสืบสวนข้อเท็จจริง */
|
||||||
|
|
@ -37,40 +41,23 @@ export const useInvestigateFactStore = defineStore(
|
||||||
{ id: 60, name: "60 วัน" },
|
{ id: 60, name: "60 วัน" },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const offenseDetailsOps = ref<DataOption[]>([
|
|
||||||
{ id: "NOT_SPECIFIED", name: "ยังไม่ระบุ" },
|
|
||||||
{ id: "NOT_DEADLY", name: "ไม่ร้ายแรง" },
|
|
||||||
{ id: "DEADLY", name: "ร้ายแรง" },
|
|
||||||
]);
|
|
||||||
const investigationDetailOps = ref<DataOption[]>([
|
const investigationDetailOps = ref<DataOption[]>([
|
||||||
{ id: "APPOINT_DIRECTORS", name: "แต่งตั้งกรรมการสืบสวน" },
|
{ id: "APPOINT_DIRECTORS", name: "แต่งตั้งกรรมการสืบสวน" },
|
||||||
{ id: "SECRET_INVESTIGATION", name: "สืบสวนทางลับ" },
|
{ id: "SECRET_INVESTIGATION", name: "สืบสวนทางลับ" },
|
||||||
{ id: "OTHER", name: "อื่นๆ" },
|
{ id: "OTHER", name: "อื่นๆ" },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const faultOps = ref<DataOption[]>([
|
const faultOps = ref<DataOption[]>([
|
||||||
{ id: "NEW", name: "กำลังสืบสวน" },
|
{ id: "NEW", name: "กำลังสืบสวน" },
|
||||||
{ id: "STOP", name: "ยุติเรื่อง" },
|
{ id: "STOP", name: "ยุติเรื่อง" },
|
||||||
{ id: "SEND_DISCIPLINARY", name: "ส่งไปสอบสวน" },
|
{ id: "SEND_DISCIPLINARY", name: "ส่งไปสอบสวนแล้ว" },
|
||||||
]);
|
]);
|
||||||
const investigationStatusResultOptions = ref<DataOption[]>([
|
|
||||||
{ id: "NOT_SPECIFIED", name: "ยังไม่ระบุ" },
|
|
||||||
{ id: "HAVE_CAUSE", name: "มีมูล" },
|
|
||||||
{ id: "NO_CAUSE", name: "ไม่มีมูล" },
|
|
||||||
]);
|
|
||||||
const investigationCauseTextOptions = ref<DataOption[]>([
|
|
||||||
{ id: "ร้ายแรง", name: "ร้ายแรง" },
|
|
||||||
{ id: "ไม่ร้ายแรง", name: "ไม่ร้ายแรง" },
|
|
||||||
]);
|
|
||||||
const respondentTypeOp = ref<DataOption[]>([
|
|
||||||
{ id: "PERSON", name: "บุคคล" },
|
|
||||||
{ id: "ORGANIZATION", name: "หน่วยงาน" },
|
|
||||||
{ id: "BANGKOK", name: "กรุงเทพมหานคร" },
|
|
||||||
])
|
|
||||||
const daysExtendOp = ref<DataNumberOption[]>(daysExtendOps.value);
|
const daysExtendOp = ref<DataNumberOption[]>(daysExtendOps.value);
|
||||||
const investigationDetailOp = ref<DataOption[]>(investigationDetailOps.value);
|
const investigationDetailOp = ref<DataOption[]>(
|
||||||
|
investigationDetailOps.value
|
||||||
|
);
|
||||||
const faultOp = ref<DataOption[]>(faultOps.value);
|
const faultOp = ref<DataOption[]>(faultOps.value);
|
||||||
const visibleColumnsPerson = ref<string[]>([]);
|
|
||||||
const columnsPerson = ref<QTableProps["columns"]>([]);
|
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
"no",
|
"no",
|
||||||
"title",
|
"title",
|
||||||
|
|
@ -192,23 +179,19 @@ export const useInvestigateFactStore = defineStore(
|
||||||
|
|
||||||
const rows = ref<InvestigatefactsDataRowType[]>();
|
const rows = ref<InvestigatefactsDataRowType[]>();
|
||||||
|
|
||||||
const rowsAdd = ref<ArrayPerson[]>([])
|
const respondentTypeOps = ref<DataOption[]>(
|
||||||
function fetchInvestigateAdd(data: ArrayPerson[]) {
|
mainStore.complainantoptionsMain
|
||||||
rowsAdd.value = data
|
);
|
||||||
}
|
|
||||||
const respondentTypeOps = ref<DataOption[]>(respondentTypeOp.value)
|
|
||||||
function filterSelector(val: string, update: Function, type: string) {
|
function filterSelector(val: string, update: Function, type: string) {
|
||||||
console.log(val)
|
console.log(val);
|
||||||
update(() => {
|
update(() => {
|
||||||
const needle = val.toLowerCase();
|
const needle = val.toLowerCase();
|
||||||
|
|
||||||
if (type === "filtercomplainantType") {
|
if (type === "filtercomplainantType") {
|
||||||
respondentTypeOps.value = respondentTypeOp.value.filter(
|
respondentTypeOps.value = mainStore.complainantoptionsMain.filter(
|
||||||
(v: any) => v.name.toLowerCase().indexOf(needle) > -1
|
(v: any) => v.name.toLowerCase().indexOf(needle) > -1
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
async function fecthList(data: ListData[]) {
|
async function fecthList(data: ListData[]) {
|
||||||
|
|
@ -216,34 +199,29 @@ export const useInvestigateFactStore = defineStore(
|
||||||
return {
|
return {
|
||||||
id: e.id,
|
id: e.id,
|
||||||
title: e.title,
|
title: e.title,
|
||||||
respondentType: convertRespondentType(e.respondentType),
|
respondentType: mainStore.convertComplaintType(e.respondentType),
|
||||||
offenseDetails: convertOffenseDetails(
|
offenseDetails: mainStore.convertOffenseDetailst(e.offenseDetails),
|
||||||
e.offenseDetails
|
|
||||||
),
|
|
||||||
investigationDetail: convertInvestigationDetail(
|
investigationDetail: convertInvestigationDetail(
|
||||||
e.investigationDetail
|
e.investigationDetail
|
||||||
),
|
),
|
||||||
dateInvestigate:
|
dateInvestigate:
|
||||||
e.investigationDateStart && e.investigationDateEnd
|
e.investigationDateStart && e.investigationDateEnd
|
||||||
? `${date2Thai(e.investigationDateStart)} - ${date2Thai(e.investigationDateEnd)}`
|
? `${date2Thai(e.investigationDateStart)} - ${date2Thai(
|
||||||
|
e.investigationDateEnd
|
||||||
|
)}`
|
||||||
: "-",
|
: "-",
|
||||||
investigationStatusResult: activeStatusResult(e.investigationStatusResult),
|
investigationStatusResult: mainStore.convertStatusResult(
|
||||||
|
e.investigationStatusResult
|
||||||
|
),
|
||||||
status: convertStatus(e.status),
|
status: convertStatus(e.status),
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function convertRespondentType(val: string) {
|
|
||||||
const result = respondentTypeOp.value.find((x: any) => x.id == val)?.name;
|
|
||||||
return result ? result : "-";
|
|
||||||
}
|
|
||||||
|
|
||||||
function convertOffenseDetails(val: string) {
|
|
||||||
const result = offenseDetailsOps.value.find((x: any) => x.id == val)?.name;
|
|
||||||
return result ? result : "-";
|
|
||||||
}
|
|
||||||
|
|
||||||
function convertInvestigationDetail(val: string) {
|
function convertInvestigationDetail(val: string) {
|
||||||
const result = investigationDetailOps.value.find((x: any) => x.id == val)?.name;
|
const result = investigationDetailOps.value.find(
|
||||||
|
(x: any) => x.id == val
|
||||||
|
)?.name;
|
||||||
return result ? result : "-";
|
return result ? result : "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -251,12 +229,6 @@ export const useInvestigateFactStore = defineStore(
|
||||||
const result = faultOps.value.find((x: any) => x.id == val)?.name;
|
const result = faultOps.value.find((x: any) => x.id == val)?.name;
|
||||||
return result ? result : "-";
|
return result ? result : "-";
|
||||||
}
|
}
|
||||||
function activeStatusResult(val: string) {
|
|
||||||
const result = investigationStatusResultOptions.value.find(
|
|
||||||
(x: any) => x.id == val
|
|
||||||
)?.name;
|
|
||||||
return result ? result : "-";
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
tabMenu,
|
tabMenu,
|
||||||
|
|
@ -271,18 +243,10 @@ export const useInvestigateFactStore = defineStore(
|
||||||
investigationDetailOp,
|
investigationDetailOp,
|
||||||
visibleColumns,
|
visibleColumns,
|
||||||
columns,
|
columns,
|
||||||
investigationStatusResultOptions,
|
|
||||||
investigationCauseTextOptions,
|
|
||||||
fetchInvestigateAdd,
|
|
||||||
rowsAdd,
|
|
||||||
respondentTypeOp,
|
|
||||||
filterSelector,
|
filterSelector,
|
||||||
respondentTypeOps,
|
respondentTypeOps,
|
||||||
organizationIdOp,
|
organizationIdOp,
|
||||||
ocListFn,
|
ocListFn,
|
||||||
columnsPerson,
|
|
||||||
visibleColumnsPerson,
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,10 @@ import type {
|
||||||
DataResultList,
|
DataResultList,
|
||||||
} from "@/modules/11_discipline/interface/response/result";
|
} from "@/modules/11_discipline/interface/response/result";
|
||||||
|
|
||||||
import { useStoreResultMain } from "@/modules/11_discipline/store";
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const storeMain = useStoreResultMain();
|
const storeMain = useDisciplineMainStore();
|
||||||
const { date2Thai } = mixin;
|
const { date2Thai } = mixin;
|
||||||
|
|
||||||
export const useDisciplineResultStore = defineStore(
|
export const useDisciplineResultStore = defineStore(
|
||||||
|
|
@ -30,7 +30,7 @@ export const useDisciplineResultStore = defineStore(
|
||||||
id: e.id,
|
id: e.id,
|
||||||
title: e.title,
|
title: e.title,
|
||||||
respondentType: e.respondentType
|
respondentType: e.respondentType
|
||||||
? storeMain.convertRespondentType(e.respondentType)
|
? storeMain.convertComplaintType(e.respondentType)
|
||||||
: "-",
|
: "-",
|
||||||
offenseDetails: e.offenseDetails
|
offenseDetails: e.offenseDetails
|
||||||
? storeMain.convertFault(e.offenseDetails)
|
? storeMain.convertFault(e.offenseDetails)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue