แก้ไขเรื่องร้องเรียน, สืบสวน, สอบสวน
This commit is contained in:
parent
76594a2359
commit
f247167e9a
20 changed files with 1356 additions and 1714 deletions
|
|
@ -1,269 +0,0 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, computed, watchEffect, watch, onMounted } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { directorType } from "@/modules/11_discipline/interface/index/Main";
|
||||
|
||||
import DialogHeader from "@/modules/05_placement/components/PersonalList/DialogHeader.vue";
|
||||
|
||||
const $q = useQuasar();
|
||||
const selected = ref<directorType[]>([]);
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, success, messageError, dialogConfirm, hideLoader } = mixin;
|
||||
const currentPage = ref<number>(1);
|
||||
/** ค้นหาคอลัม */
|
||||
const visibleColumns2 = ref<string[]>([
|
||||
"no",
|
||||
"name",
|
||||
"position",
|
||||
"duty",
|
||||
"email",
|
||||
"phone",
|
||||
"role",
|
||||
]);
|
||||
|
||||
/**ข้อมูลหัว ตาราง*/
|
||||
const columns2 = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "no",
|
||||
align: "left",
|
||||
label: "ลำดับ",
|
||||
sortable: false,
|
||||
field: "no",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "name",
|
||||
align: "left",
|
||||
label: "ชื่อ-นามสกุล",
|
||||
sortable: true,
|
||||
field: "name",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "position",
|
||||
align: "left",
|
||||
label: "ตำแหน่ง",
|
||||
sortable: true,
|
||||
field: "position",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
|
||||
{
|
||||
name: "email",
|
||||
align: "left",
|
||||
label: "อีเมล",
|
||||
sortable: true,
|
||||
field: "email",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "phone",
|
||||
align: "left",
|
||||
label: "เบอร์โทรศัพท์",
|
||||
sortable: true,
|
||||
field: "phone",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
]);
|
||||
|
||||
/** รับ props มาจากหน้าหลัก */
|
||||
const props = defineProps({
|
||||
Modal: Boolean,
|
||||
clickClose: Function,
|
||||
getData: Function,
|
||||
rows2: Array,
|
||||
filterKeyword2: String,
|
||||
filterTable: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
maxPage: {
|
||||
type: Number,
|
||||
require: true,
|
||||
},
|
||||
rowsPerPage: {
|
||||
type: Number,
|
||||
require: true,
|
||||
},
|
||||
page: {
|
||||
type: Number,
|
||||
require: true,
|
||||
},
|
||||
getList: {
|
||||
type: Function,
|
||||
default: () => "",
|
||||
},
|
||||
});
|
||||
|
||||
const checkSelected = computed(() => {
|
||||
if (selected.value.length === 0) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
/** popup ยืนยันส่งัว */
|
||||
function saveDirector() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
() => DirectorSave(),
|
||||
"ยืนยันเพิ่มรายชื่อกรรมการ",
|
||||
"ต้องการยืนยันเพิ่มรายชื่อกรรมการ?"
|
||||
);
|
||||
}
|
||||
|
||||
/** ส่งไปออกคำสั่ง */
|
||||
async function DirectorSave() {
|
||||
emit("returnDirector", selected.value);
|
||||
}
|
||||
|
||||
const emit = defineEmits([
|
||||
"update:filterKeyword2",
|
||||
"update:selected",
|
||||
"update:pagination",
|
||||
"returnDirector",
|
||||
]);
|
||||
|
||||
function updateInput(value: any) {
|
||||
emit("update:filterKeyword2", value);
|
||||
}
|
||||
|
||||
/**รีเซ็ตค่าในช่องค้นหา */
|
||||
function Reset() {
|
||||
emit("update:filterKeyword2", "");
|
||||
}
|
||||
|
||||
/** เช็คค่า props.Modal === true */
|
||||
watchEffect(() => {
|
||||
if (props.Modal === true) {
|
||||
// selected.value = [];
|
||||
props.getList();
|
||||
}
|
||||
});
|
||||
|
||||
/** แสดงจำนวนในตาราง */
|
||||
const pagination = ref({
|
||||
descending: true,
|
||||
page: Number(props.page),
|
||||
rowsPerPage: props.rowsPerPage,
|
||||
});
|
||||
|
||||
const updateProp = (newPagination: any, page: number) => {
|
||||
// ส่ง event ไปยัง parent component เพื่ออัพเดทค่า props
|
||||
emit("update:pagination", newPagination, page);
|
||||
};
|
||||
|
||||
watch(
|
||||
() => currentPage.value,
|
||||
() => {
|
||||
updateProp(pagination.value.rowsPerPage, currentPage.value);
|
||||
}
|
||||
);
|
||||
|
||||
watch(
|
||||
() => pagination.value.rowsPerPage,
|
||||
() => {
|
||||
currentPage.value = 1;
|
||||
updateProp(pagination.value.rowsPerPage, currentPage.value);
|
||||
}
|
||||
);
|
||||
</script>
|
||||
<template>
|
||||
<q-dialog v-model="props.Modal">
|
||||
<q-card style="width: 1200px; max-width: 80vw">
|
||||
<DialogHeader title="เลือกรายชื่อกรรมการ" :close="clickClose" />
|
||||
<q-separator />
|
||||
<q-card-section>
|
||||
<q-input
|
||||
borderless
|
||||
outlined
|
||||
dense
|
||||
class="col-12 q-mb-sm"
|
||||
debounce="300"
|
||||
:model-value="filterKeyword2"
|
||||
@update:model-value="updateInput"
|
||||
placeholder="ค้นหารายชื่อ"
|
||||
style="max-width: 100%"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="filterKeyword2 == ''" name="search" />
|
||||
<q-icon
|
||||
v-if="filterKeyword2 !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="Reset"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<d-table
|
||||
:columns="columns2"
|
||||
:rows="rows2"
|
||||
:filter="filterKeyword2"
|
||||
row-key="id"
|
||||
:visible-columns="visibleColumns2"
|
||||
selection="multiple"
|
||||
v-model:selected="selected"
|
||||
:rows-per-page-options="[10, 25, 50, 100]"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<template v-slot:header-selection="scope">
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="scope.selected"
|
||||
/>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td>
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="props.selected"
|
||||
/>
|
||||
</q-td>
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<div v-if="col.name == 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ col.value }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
</q-card-section>
|
||||
|
||||
<q-separator />
|
||||
|
||||
<q-card-actions align="right" class="bg-white text-teal">
|
||||
<q-btn
|
||||
label="เพิ่มรายชื่อกรรมการ"
|
||||
@click="saveDirector"
|
||||
:disable="checkSelected"
|
||||
color="public"
|
||||
/>
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
|
@ -5,20 +5,18 @@ import { useRouter, useRoute } from "vue-router";
|
|||
import type { QTableProps } from "quasar";
|
||||
import http from "@/plugins/http";
|
||||
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 FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
||||
import FormInvestigatefacts from "@/modules/11_discipline/components/2_InvestigateFacts/Form.vue"; //สืบสวนข้อเท็จจริง
|
||||
import FormDisciplinary from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue"; // สอบสวนความผิดทางวินัย
|
||||
import type {
|
||||
FormData,
|
||||
PersonsArray,
|
||||
} from "@/modules/11_discipline/interface/request/disciplinary";
|
||||
import type { PersonsArray } from "@/modules/11_discipline/interface/request/disciplinary";
|
||||
import type {
|
||||
FormData as FormDataComplaint,
|
||||
ArrayPerson,
|
||||
ArrayFileList,
|
||||
} 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";
|
||||
|
||||
|
|
@ -38,6 +36,8 @@ const id = ref<string>(route.params.id as string);
|
|||
const data = ref<object>();
|
||||
const status = ref<string>("");
|
||||
|
||||
const idInvestigate = ref<string>("");
|
||||
const idComplaint = ref<string>("");
|
||||
/** function fetchData สอบสวนความผิดทางวินัย*/
|
||||
async function fetchDetailDisciplinary() {
|
||||
showLoader();
|
||||
|
|
@ -46,6 +46,8 @@ async function fetchDetailDisciplinary() {
|
|||
.then((res) => {
|
||||
data.value = res.data.result;
|
||||
status.value = res.data.result.status;
|
||||
idComplaint.value = res.data.result.idComplaint;
|
||||
idInvestigate.value = res.data.result.idInvestigate;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -59,7 +61,7 @@ async function fetchDetailDisciplinary() {
|
|||
async function fetchDetailInvestigate() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.disciplineInvestigateById(id.value))
|
||||
.get(config.API.investigateById(idInvestigate.value))
|
||||
.then((res) => {
|
||||
const dataList = res.data.result;
|
||||
dataInvestigatefacts.id = dataList.id;
|
||||
|
|
@ -85,6 +87,9 @@ async function fetchDetailInvestigate() {
|
|||
dataList.disciplineInvestigateRelevantDocs;
|
||||
dataInvestigatefacts.investigationStatusResult =
|
||||
dataList.investigationStatusResult;
|
||||
dataInvestigatefacts.investigationExtendStatus = dataList.investigationExtendStatus;
|
||||
dataInvestigatefacts.investigationDaysExtend =
|
||||
dataList.investigationDaysExtend;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -98,7 +103,7 @@ async function fetchDetailInvestigate() {
|
|||
async function fetchDetailComplaints() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.disciplineComplaintsById(id.value))
|
||||
.get(config.API.complaintbyId(idComplaint.value))
|
||||
.then((res) => {
|
||||
const dataList = res.data.result;
|
||||
dataComplaints.id = dataList.id;
|
||||
|
|
@ -169,11 +174,16 @@ function sentIssue() {
|
|||
}
|
||||
|
||||
function sentIssueGate() {
|
||||
dialogConfirm($q, () => confirmSentIssueGate(),'ยืนยันส่งไปสรุปผลการพิจารณา','ต้องการยืนยันส่งไปสรุปผลการพิจารณาใช่หรือไม่?');
|
||||
dialogConfirm(
|
||||
$q,
|
||||
() => confirmSentIssueGate(),
|
||||
"ยืนยันส่งไปสรุปผลการพิจารณา",
|
||||
"ต้องการยืนยันส่งไปสรุปผลการพิจารณาใช่หรือไม่?"
|
||||
);
|
||||
}
|
||||
|
||||
function confirmSentIssueGate() {
|
||||
showLoader()
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.disciplinaryApprove(id.value))
|
||||
.then((res) => {})
|
||||
|
|
@ -271,6 +281,7 @@ watch(
|
|||
|
||||
/** ข้อมูล v-model ของฟอร์มเรื่องร้องเรียน */
|
||||
const personObjComplaint = reactive<ArrayPerson>({
|
||||
id: "",
|
||||
personId: "",
|
||||
idcard: "",
|
||||
name: "",
|
||||
|
|
@ -442,10 +453,10 @@ const dataInvestigatefacts = reactive<FormInvestigateFact>({
|
|||
investigationDetailOther: "",
|
||||
evidenceFiles: null,
|
||||
fileComplaint: null,
|
||||
clickTime: false,
|
||||
investigationExtendStatus: false,
|
||||
investigationDateStart: null,
|
||||
investigationDateEnd: null,
|
||||
daysExtend: null,
|
||||
investigationDaysExtend: null,
|
||||
investigationStatusResult: "",
|
||||
investigationCauseText: "",
|
||||
complaintStatus: "",
|
||||
|
|
@ -541,7 +552,7 @@ const dataInvestigatefacts = reactive<FormInvestigateFact>({
|
|||
</q-card>
|
||||
</div>
|
||||
|
||||
<Popup
|
||||
<PopupSendToNext
|
||||
:modal="modalPopup"
|
||||
:close="closePopup"
|
||||
title="ส่งไปพักราชการ"
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import type { DataOptionRes } from "@/modules/11_discipline/interface/response/M
|
|||
|
||||
/** import components*/
|
||||
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 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 { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
||||
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 investigateDis = useInvestigateDisStore();
|
||||
const mainStore = useDisciplineMainStore();
|
||||
const { filterSelector } = complainstStore; // function จาก store complainstStore
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, showLoader, hideLoader, dialogConfirm, messageError } =
|
||||
|
|
@ -52,95 +55,13 @@ const modalPerson = ref<boolean>(false);
|
|||
/** search data table*/
|
||||
const filter = ref<string>("");
|
||||
|
||||
const isSave = ref<boolean>(false); // มีการแก้ไขรอบันทึก
|
||||
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
||||
|
||||
function toggleModal() {
|
||||
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*/
|
||||
const formData = reactive<FormData>({
|
||||
respondentType: "",
|
||||
|
|
@ -158,7 +79,7 @@ const formData = reactive<FormData>({
|
|||
result: "", // ผลการสอบสวน
|
||||
directors: [],
|
||||
persons: [],
|
||||
clickTime: false,
|
||||
extendStatus: false,
|
||||
disciplinaryDateStart: null, // วันที่เริ่มการสอบสวน
|
||||
disciplinaryDateEnd: null, // วันที่สิ้นสุดการสอบสวน
|
||||
daysExtend: 0,
|
||||
|
|
@ -167,21 +88,6 @@ const formData = reactive<FormData>({
|
|||
disciplinaryStatusResult: "",
|
||||
disciplinaryCauseText: "",
|
||||
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_DocSummaryEvidences = ref<FileLists[]>([]);
|
||||
|
|
@ -280,8 +186,7 @@ function validateForm() {
|
|||
}
|
||||
if (hasError.every((result) => result === true)) {
|
||||
onSubmit();
|
||||
} else {
|
||||
console.log("ไม่ผ่าน ");
|
||||
isSave.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -306,8 +211,6 @@ function onSubmit() {
|
|||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
const dataList = formData.directors.map((item: any) => item.id);
|
||||
formData.directors = dataList;
|
||||
emit("submit:disciplinary", formData);
|
||||
},
|
||||
"ยืนยันการบันทึกข้อมูล",
|
||||
|
|
@ -315,14 +218,23 @@ function onSubmit() {
|
|||
);
|
||||
}
|
||||
|
||||
/** ฟังชั่น delect */
|
||||
async function deleteData(id: string) {
|
||||
console.log("delete");
|
||||
/** ฟังชั่นลบข้อมูลกรรมการ */
|
||||
async function deleteDirector(id: string) {
|
||||
changeFormData();
|
||||
const dataRow = rows.value;
|
||||
const updatedRows = dataRow.filter((item: any) => item.id !== id);
|
||||
rows.value = updatedRows;
|
||||
|
||||
const dataList = updatedRows.map((item: any) => item.id);
|
||||
formData.directors = dataList;
|
||||
}
|
||||
|
||||
/** เรียกข้อมูลรายละเอียด*/
|
||||
async function fetchDatadetail() {
|
||||
if (props.data) {
|
||||
isReadonly.value = props.data.status != "NEW" ?? true;
|
||||
isSave.value = false;
|
||||
|
||||
formData.respondentType = props.data.respondentType;
|
||||
formData.organizationId = props.data.organizationId;
|
||||
formData.consideredAgency = props.data.consideredAgency;
|
||||
|
|
@ -337,7 +249,6 @@ async function fetchDatadetail() {
|
|||
formData.disciplinaryRecordAccuser = props.data.disciplinaryRecordAccuser;
|
||||
formData.disciplinaryWitnesses = props.data.disciplinaryWitnesses;
|
||||
formData.result = props.data.result;
|
||||
formData.directors = props.data.director ?? [];
|
||||
formData.persons = props.data.persons ?? [];
|
||||
formData.disciplinaryDateStart = props.data.disciplinaryDateStart ?? null;
|
||||
formData.disciplinaryDateEnd = props.data.disciplinaryDateEnd ?? null;
|
||||
|
|
@ -359,23 +270,25 @@ async function fetchDatadetail() {
|
|||
|
||||
investigateDis.rowSent = formData.persons;
|
||||
|
||||
formData.disciplinaryStatusResult = props.data.disciplinaryStatusResult;
|
||||
formData.disciplinaryCauseText = props.data.disciplinaryCauseText;
|
||||
formData.disciplinaryResult = props.data.disciplinaryResult;
|
||||
|
||||
/** MAP รายชื่อกรรมการ หน้าหลัก */
|
||||
let datalistDirector: responseType[] = formData.directors.map(
|
||||
(e: directorType) => ({
|
||||
id: e.id,
|
||||
directorId: e.directorId,
|
||||
name: `${e.prefix}${e.firstName} ${e.lastName}`,
|
||||
prefix: e.prefix,
|
||||
firstName: e.firstName,
|
||||
lastName: e.lastName,
|
||||
position: e.position ? e.position : "-",
|
||||
email: e.email ? e.email : "-",
|
||||
phone: e.phone ? e.phone : "-",
|
||||
total: Number(e.total) ?? "-",
|
||||
duty: e.duty ? e.duty : "-",
|
||||
})
|
||||
);
|
||||
rows.value = datalistDirector;
|
||||
const dataMap = props.data.director.map((item: any) => ({
|
||||
id: item.directorId,
|
||||
name: `${item.prefix}${item.firstName} ${item.lastName}`,
|
||||
prefix: item.prefix,
|
||||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
position: item.position,
|
||||
email: item.email,
|
||||
phone: item.phone,
|
||||
}));
|
||||
|
||||
rows.value = dataMap;
|
||||
const dataList = dataMap.map((item: any) => item.id);
|
||||
formData.directors = dataList;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -518,6 +431,11 @@ async function selectComplainant(val: string) {
|
|||
// }
|
||||
}
|
||||
|
||||
/** ฟังก์ชั่นเช็คการแก้ไขฟอร์มแล้วไม่ได้กดบันทึก */
|
||||
function changeFormData() {
|
||||
isSave.value = true;
|
||||
}
|
||||
|
||||
/** Hook */
|
||||
onMounted(async () => {
|
||||
await fetchOrganization();
|
||||
|
|
@ -652,7 +570,7 @@ onMounted(async () => {
|
|||
<div class="col-xs-12 q-pa-sm">
|
||||
<d-table
|
||||
ref="table"
|
||||
:columns="columnsPerson"
|
||||
:columns="mainStore.columnsRespondent"
|
||||
:rows="formData.persons"
|
||||
row-key="personId"
|
||||
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"
|
||||
>
|
||||
วันที่สอบสวน
|
||||
<!-- v-if="
|
||||
props.data.disciplinaryDateStart &&
|
||||
props.data.disciplinaryDateStart != null &&
|
||||
props.data.disciplinaryDateEnd != null
|
||||
" -->
|
||||
|
||||
<q-checkbox
|
||||
for="#clickTime"
|
||||
v-if="
|
||||
formData.disciplinaryDateStart != null &&
|
||||
formData.disciplinaryDateEnd != null &&
|
||||
((isReadonly && formData.extendStatus) || !isReadonly)
|
||||
"
|
||||
for="#extendStatus"
|
||||
size="md"
|
||||
v-model="formData.clickTime"
|
||||
v-model="formData.extendStatus"
|
||||
label="ขยายเวลา"
|
||||
color="primary"
|
||||
dense
|
||||
|
|
@ -750,7 +668,7 @@ onMounted(async () => {
|
|||
<div class="col-12"><q-separator /></div>
|
||||
<div class="q-pa-sm">
|
||||
<div class="q-col-gutter-sm row">
|
||||
<div class="col-3" v-if="!formData.clickTime">
|
||||
<div class="col-3" v-if="!formData.extendStatus">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
:readonly="isUpdate"
|
||||
|
|
@ -802,7 +720,7 @@ onMounted(async () => {
|
|||
</datepicker>
|
||||
</div>
|
||||
|
||||
<div class="col-3" v-if="formData.clickTime">
|
||||
<div class="col-3" v-if="formData.extendStatus">
|
||||
<q-selectinvestigateDis
|
||||
for="#daysExtend"
|
||||
outlined
|
||||
|
|
@ -817,7 +735,7 @@ onMounted(async () => {
|
|||
map-options
|
||||
:rules="[
|
||||
(val: any) =>
|
||||
formData.clickTime
|
||||
formData.extendStatus
|
||||
? !!val || 'กรุณาเลือกจำนวนวันที่ต้องการขยาย'
|
||||
: true,
|
||||
]"
|
||||
|
|
@ -1147,8 +1065,8 @@ onMounted(async () => {
|
|||
flat
|
||||
round
|
||||
color="red"
|
||||
@click="deleteData(props.row.id)"
|
||||
icon="mdi-delete"
|
||||
@click="deleteDirector(props.row.id)"
|
||||
icon="mdi-delete-outline"
|
||||
>
|
||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
|
|
@ -1305,7 +1223,7 @@ onMounted(async () => {
|
|||
:rules="[
|
||||
(val) => !!val || `${'กรุณาเลือกผลการสอบสวน'}`,
|
||||
]"
|
||||
:options="investigateDis.offenseDetailsOps"
|
||||
:options="mainStore.statusResultOptions"
|
||||
label="ผลการสอบสวน"
|
||||
emit-value
|
||||
map-options
|
||||
|
|
@ -1454,7 +1372,7 @@ onMounted(async () => {
|
|||
@returnData="handleSave"
|
||||
/>
|
||||
|
||||
<Dialogbody
|
||||
<DialogDirector
|
||||
v-model:Modal="modal"
|
||||
:clickClose="clickClose"
|
||||
:rows2="listDirector"
|
||||
|
|
@ -1464,6 +1382,7 @@ onMounted(async () => {
|
|||
:rowsPerPage="rowsPerPage"
|
||||
:page="page"
|
||||
:maxPage="maxPage"
|
||||
:selected-row="rows"
|
||||
@update:pagination="updatePaging"
|
||||
@returnDirector="returnDirector"
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue