แก้ไขฟอร์มสืบสวน และผู้ถูกร้องเรียนของวินัย
This commit is contained in:
parent
ab15f989cc
commit
7af8370b08
8 changed files with 153 additions and 200 deletions
|
|
@ -1,11 +1,10 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, watch } from "vue";
|
import { ref, watch } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
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/main";
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||||
|
|
||||||
|
|
@ -220,7 +219,7 @@ watch(()=>props.selectedData,()=>{
|
||||||
ref="table"
|
ref="table"
|
||||||
:columns="mainStore.columnsRespondent"
|
:columns="mainStore.columnsRespondent"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
row-key="idcard"
|
row-key="personId"
|
||||||
flat
|
flat
|
||||||
bordered
|
bordered
|
||||||
:paging="true"
|
:paging="true"
|
||||||
|
|
|
||||||
|
|
@ -171,10 +171,9 @@ function onSubmit() {
|
||||||
async () => {
|
async () => {
|
||||||
if (mainStore.rowsAdd) {
|
if (mainStore.rowsAdd) {
|
||||||
formData.persons = mainStore.rowsAdd;
|
formData.persons = mainStore.rowsAdd;
|
||||||
props.onSubmit(formData);
|
}
|
||||||
isSave.value = false;
|
props.onSubmit(formData);
|
||||||
} else props.onSubmit(formData);
|
isSave.value = false;
|
||||||
// props.onSubmit(formData);
|
|
||||||
},
|
},
|
||||||
"ยืนยันการบันทึกข้อมูล",
|
"ยืนยันการบันทึกข้อมูล",
|
||||||
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
|
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
|
||||||
|
|
@ -242,7 +241,7 @@ watch(props.data, async () => {
|
||||||
mainStore.rowsAdd = props.data.persons;
|
mainStore.rowsAdd = props.data.persons;
|
||||||
|
|
||||||
const dataMap = props.data.directors.map((item: any) => ({
|
const dataMap = props.data.directors.map((item: any) => ({
|
||||||
id: item.directorId,
|
id: item.id,
|
||||||
name: `${item.prefix}${item.firstName} ${item.lastName}`,
|
name: `${item.prefix}${item.firstName} ${item.lastName}`,
|
||||||
prefix: item.prefix,
|
prefix: item.prefix,
|
||||||
firstName: item.firstName,
|
firstName: item.firstName,
|
||||||
|
|
@ -381,6 +380,7 @@ async function addPerson(data: any) {
|
||||||
*/
|
*/
|
||||||
function handleSave(returnData: any) {
|
function handleSave(returnData: any) {
|
||||||
addPerson(returnData);
|
addPerson(returnData);
|
||||||
|
changeFormData();
|
||||||
toggleModal();
|
toggleModal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -425,13 +425,14 @@ function returnDirector(data: any) {
|
||||||
const dataList = data.map((item: any) => item.id);
|
const dataList = data.map((item: any) => item.id);
|
||||||
formData.directors = dataList;
|
formData.directors = dataList;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
changeFormData();
|
||||||
clickClose();
|
clickClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
function deletePerson(id: string) {
|
function deletePerson(id: string) {
|
||||||
changeFormData();
|
changeFormData();
|
||||||
const dataRow = mainStore.rowsAdd;
|
const dataRow = mainStore.rowsAdd;
|
||||||
const updatedRows = dataRow.filter((item: any) => item.id !== id);
|
const updatedRows = dataRow.filter((item: any) => item.personId !== id);
|
||||||
mainStore.rowsAdd = updatedRows;
|
mainStore.rowsAdd = updatedRows;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -451,6 +452,7 @@ function changeFormData() {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
mainStore.rowsAdd = [];
|
||||||
getOc();
|
getOc();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -635,7 +637,7 @@ onMounted(async () => {
|
||||||
color="red"
|
color="red"
|
||||||
class="q-ml-sm"
|
class="q-ml-sm"
|
||||||
icon="mdi-delete-outline"
|
icon="mdi-delete-outline"
|
||||||
@click="deletePerson(props.row.id)"
|
@click="deletePerson(props.row.personId)"
|
||||||
><q-tooltip>ลบผู้ถูกร้องเรียน</q-tooltip></q-btn
|
><q-tooltip>ลบผู้ถูกร้องเรียน</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
@ -1302,11 +1304,11 @@ onMounted(async () => {
|
||||||
|
|
||||||
<DialogAddPersonal
|
<DialogAddPersonal
|
||||||
title="ผู้ถูกร้องเรียน"
|
title="ผู้ถูกร้องเรียน"
|
||||||
:mainData="mainStore.rowsAdd"
|
|
||||||
:modal="modalPerson"
|
:modal="modalPerson"
|
||||||
btn-title="เพิ่มรายชื่อผู้ถูกร้องเรียน"
|
btn-title="เพิ่มรายชื่อผู้ถูกร้องเรียน"
|
||||||
:close="toggleModal"
|
:close="toggleModal"
|
||||||
:save="addPerson"
|
:save="addPerson"
|
||||||
|
:selected-data="mainStore.rowsAdd"
|
||||||
@returnData="handleSave"
|
@returnData="handleSave"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
@ -1332,4 +1334,4 @@ onMounted(async () => {
|
||||||
min-height: 25px;
|
min-height: 25px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@/modules/11_discipline/store/store
|
@/modules/11_discipline/store/store
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,16 @@
|
||||||
import { onMounted, reactive, ref, watch } from "vue";
|
import { onMounted, reactive, ref, watch } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
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 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 { PersonsArray } from "@/modules/11_discipline/interface/request/disciplinary";
|
import type {
|
||||||
|
PersonsArray,
|
||||||
|
Persons,
|
||||||
|
} from "@/modules/11_discipline/interface/request/disciplinary";
|
||||||
import type {
|
import type {
|
||||||
FormData as FormDataComplaint,
|
FormData as FormDataComplaint,
|
||||||
ArrayPerson,
|
ArrayPerson,
|
||||||
|
|
@ -22,6 +24,9 @@ import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/in
|
||||||
/**import store*/
|
/**import store*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
||||||
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||||
|
|
||||||
|
const mainStore = useDisciplineMainStore();
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
@ -86,7 +91,8 @@ async function fetchDetailInvestigate() {
|
||||||
dataList.disciplineInvestigateRelevantDocs;
|
dataList.disciplineInvestigateRelevantDocs;
|
||||||
dataInvestigatefacts.investigationStatusResult =
|
dataInvestigatefacts.investigationStatusResult =
|
||||||
dataList.investigationStatusResult;
|
dataList.investigationStatusResult;
|
||||||
dataInvestigatefacts.investigationExtendStatus = dataList.investigationExtendStatus;
|
dataInvestigatefacts.investigationExtendStatus =
|
||||||
|
dataList.investigationExtendStatus;
|
||||||
dataInvestigatefacts.investigationDaysExtend =
|
dataInvestigatefacts.investigationDaysExtend =
|
||||||
dataList.investigationDaysExtend;
|
dataList.investigationDaysExtend;
|
||||||
})
|
})
|
||||||
|
|
@ -167,8 +173,9 @@ const onSubmit = async (id: string) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
/** ยืนยัน ส่งไปออกคำสั่ง */
|
/** ยืนยัน ส่งไปออกคำสั่ง */
|
||||||
function sentIssue() {
|
const respondentRows = ref<Persons[]>();
|
||||||
console.log("sent");
|
async function sentIssue() {
|
||||||
|
respondentRows.value = await store.rowSent.filter((x) => !x.report); //x.report === false
|
||||||
modalPopup.value = true;
|
modalPopup.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -214,12 +221,6 @@ function cancelInvestigate() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ฟังชั่น ส่งไปออกคำสั่ง*/
|
|
||||||
function confirmSentIssue() {
|
|
||||||
console.log("sent");
|
|
||||||
modalPopup.value = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ฟังชั่น ยุติเรื่อง*/
|
/** ฟังชั่น ยุติเรื่อง*/
|
||||||
function confirmEndInvestigate() {
|
function confirmEndInvestigate() {
|
||||||
console.log("sent");
|
console.log("sent");
|
||||||
|
|
@ -303,7 +304,6 @@ const fileListObjComplaint = reactive<ArrayFileList>({
|
||||||
function emitPerson(data: PersonsArray[]) {
|
function emitPerson(data: PersonsArray[]) {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
const dataMapId = data.map((item: PersonsArray) => item.id);
|
const dataMapId = data.map((item: PersonsArray) => item.id);
|
||||||
console.log(dataMapId);
|
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.put(config.API.disciplinarySuspend(id.value), {
|
.put(config.API.disciplinarySuspend(id.value), {
|
||||||
|
|
@ -321,104 +321,6 @@ function emitPerson(data: PersonsArray[]) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** หัวตาราง */
|
|
||||||
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",
|
|
||||||
]);
|
|
||||||
|
|
||||||
const dataComplaints = reactive<FormDataComplaint>({
|
const dataComplaints = reactive<FormDataComplaint>({
|
||||||
id: "",
|
id: "",
|
||||||
respondentType: "",
|
respondentType: "",
|
||||||
|
|
@ -555,9 +457,10 @@ const dataInvestigatefacts = reactive<FormInvestigateFact>({
|
||||||
:modal="modalPopup"
|
:modal="modalPopup"
|
||||||
:close="closePopup"
|
:close="closePopup"
|
||||||
title="ส่งไปพักราชการ"
|
title="ส่งไปพักราชการ"
|
||||||
:rows="store.rowSent"
|
:rows="respondentRows"
|
||||||
:columns="columns"
|
:columns="mainStore.columnsRespondent"
|
||||||
:visibleColumns="visibleColumns"
|
:visibleColumns="mainStore.visibleColumnsRespondent"
|
||||||
|
:checked-val="false"
|
||||||
@return-person="emitPerson"
|
@return-person="emitPerson"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ import type { QTableProps } from "quasar";
|
||||||
import type {
|
import type {
|
||||||
FormData,
|
FormData,
|
||||||
DisciplinaryRef,
|
DisciplinaryRef,
|
||||||
Persons,
|
|
||||||
Director,
|
Director,
|
||||||
} from "@/modules/11_discipline/interface/request/disciplinary";
|
} from "@/modules/11_discipline/interface/request/disciplinary";
|
||||||
import type {
|
import type {
|
||||||
|
|
@ -199,6 +198,7 @@ function calEndDate(val: string) {
|
||||||
formData.disciplinaryDateEnd = new Date(
|
formData.disciplinaryDateEnd = new Date(
|
||||||
dateNew.setDate(date.getDate() + Number(val))
|
dateNew.setDate(date.getDate() + Number(val))
|
||||||
);
|
);
|
||||||
|
changeFormData();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -210,6 +210,10 @@ function onSubmit() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
|
if (mainStore.rowsAdd) {
|
||||||
|
formData.persons = mainStore.rowsAdd;
|
||||||
|
}
|
||||||
|
|
||||||
emit("submit:disciplinary", formData);
|
emit("submit:disciplinary", formData);
|
||||||
},
|
},
|
||||||
"ยืนยันการบันทึกข้อมูล",
|
"ยืนยันการบันทึกข้อมูล",
|
||||||
|
|
@ -273,6 +277,8 @@ async function fetchDatadetail() {
|
||||||
formData.disciplinaryCauseText = props.data.disciplinaryCauseText;
|
formData.disciplinaryCauseText = props.data.disciplinaryCauseText;
|
||||||
formData.disciplinaryResult = props.data.disciplinaryResult;
|
formData.disciplinaryResult = props.data.disciplinaryResult;
|
||||||
|
|
||||||
|
mainStore.rowsAdd = props.data.persons;
|
||||||
|
|
||||||
/** MAP รายชื่อกรรมการ หน้าหลัก */
|
/** MAP รายชื่อกรรมการ หน้าหลัก */
|
||||||
const dataMap = props.data.director.map((item: any) => ({
|
const dataMap = props.data.director.map((item: any) => ({
|
||||||
id: item.directorId,
|
id: item.directorId,
|
||||||
|
|
@ -291,36 +297,26 @@ async function fetchDatadetail() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
async function addPerson(data: any) {
|
||||||
* function add ผู้ถูกร้องเรียนใน table
|
await mainStore.fetchData(data);
|
||||||
* @param data รายชื่อ ผู้ถูกร้องเรียน
|
|
||||||
*/
|
|
||||||
async function addPerson(data: Persons[]) {
|
|
||||||
if (!data) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const newPerson: Persons[] = Array.from(data).map((e) => ({
|
|
||||||
personId: e.personId, //id อ้างอิง profile
|
|
||||||
idcard: e.idcard, //รหัสบัตรประชาชน
|
|
||||||
prefix: e.prefix, //คำนำหน้า
|
|
||||||
firstName: e.firstName, //ชื่อ
|
|
||||||
lastName: e.lastName, //นามสกุล
|
|
||||||
posNo: e.posNo, //เลขที่ตำแหน่ง
|
|
||||||
position: e.position, //ตำแหน่ง
|
|
||||||
positionLevel: e.positionLevel, //ระดับ
|
|
||||||
salary: e.salary, //เงินเดือน
|
|
||||||
organization: e.organization, //สังกัด
|
|
||||||
name: `${e.prefix}${e.firstName} ${e.lastName}`,
|
|
||||||
}));
|
|
||||||
const mergedArray = [...formData.persons, ...newPerson];
|
|
||||||
formData.persons = mergedArray;
|
|
||||||
investigateDis.rowSent = formData.persons;
|
|
||||||
toggleModal();
|
toggleModal();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** function รับข้อมูลรายชื่อผู้ถูกร้องเรียน*/
|
/**
|
||||||
|
* ฟังชั่น รับค่าจาก คอมโพเเนน
|
||||||
|
* @param returnData ค่าที่ได้คืนมา
|
||||||
|
*/
|
||||||
function handleSave(returnData: any) {
|
function handleSave(returnData: any) {
|
||||||
addPerson(returnData);
|
addPerson(returnData);
|
||||||
|
changeFormData();
|
||||||
|
toggleModal();
|
||||||
|
}
|
||||||
|
|
||||||
|
function deletePerson(id: string) {
|
||||||
|
changeFormData();
|
||||||
|
const dataRow = mainStore.rowsAdd;
|
||||||
|
const updatedRows = dataRow.filter((item: any) => item.personId !== id);
|
||||||
|
mainStore.rowsAdd = updatedRows;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -413,10 +409,11 @@ async function updatePaging(rpp: number, p: number) {
|
||||||
* function return รายชื่อกรรมการที่เลือก
|
* function return รายชื่อกรรมการที่เลือก
|
||||||
* @param data รายชื่อกรรมการที่เลือก
|
* @param data รายชื่อกรรมการที่เลือก
|
||||||
*/
|
*/
|
||||||
async function returnDirector(data: any) {
|
function returnDirector(data: any) {
|
||||||
const dataList = data.map((item: any) => item.id);
|
const dataList = data.map((item: any) => item.id);
|
||||||
formData.directors = dataList;
|
formData.directors = dataList;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
changeFormData();
|
||||||
clickClose();
|
clickClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -437,12 +434,24 @@ function changeFormData() {
|
||||||
|
|
||||||
/** Hook */
|
/** Hook */
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
mainStore.rowsAdd = [];
|
||||||
await fetchOrganization();
|
await fetchOrganization();
|
||||||
});
|
});
|
||||||
</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" class="q-pa-sm q-gutter-sm">
|
||||||
|
<q-banner
|
||||||
|
inline-actions
|
||||||
|
bordered
|
||||||
|
class="bg-red-1 text-red border-orange"
|
||||||
|
>
|
||||||
|
<q-icon name="mdi-information-outline" size="20px" /> แจ้งเตือน
|
||||||
|
ยังไม่ได้บันทึกข้อมูล
|
||||||
|
</q-banner>
|
||||||
|
</div>
|
||||||
|
|
||||||
<form @submit.prevent="validateForm">
|
<form @submit.prevent="validateForm">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-card bordered>
|
<q-card bordered>
|
||||||
|
|
@ -466,7 +475,8 @@ onMounted(async () => {
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกผู้ร้องเรียน'}`]"
|
:rules="[(val) => !!val || `${'กรุณาเลือกผู้ร้องเรียน'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
@update:model-value="
|
@update:model-value="
|
||||||
selectComplainant(formData.respondentType)
|
selectComplainant(formData.respondentType);
|
||||||
|
changeFormData();
|
||||||
"
|
"
|
||||||
@filter="(inputValue: any,
|
@filter="(inputValue: any,
|
||||||
doneFn: Function) => filterSelector(inputValue, doneFn, 'filterrespondentType'
|
doneFn: Function) => filterSelector(inputValue, doneFn, 'filterrespondentType'
|
||||||
|
|
@ -502,6 +512,7 @@ onMounted(async () => {
|
||||||
label="เลือกสำนักงาน"
|
label="เลือกสำนักงาน"
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกสำนักงาน'}`]"
|
:rules="[(val) => !!val || `${'กรุณาเลือกสำนักงาน'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-3" id="consideredAgency">
|
<div class="col-xs-12 col-sm-3" id="consideredAgency">
|
||||||
|
|
@ -570,7 +581,7 @@ onMounted(async () => {
|
||||||
<d-table
|
<d-table
|
||||||
ref="table"
|
ref="table"
|
||||||
:columns="mainStore.columnsRespondent"
|
:columns="mainStore.columnsRespondent"
|
||||||
:rows="formData.persons"
|
:rows="mainStore.rowsAdd"
|
||||||
row-key="personId"
|
row-key="personId"
|
||||||
flat
|
flat
|
||||||
bordered
|
bordered
|
||||||
|
|
@ -590,6 +601,7 @@ onMounted(async () => {
|
||||||
col.label
|
col.label
|
||||||
}}</span>
|
}}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
|
<q-th auto-width></q-th>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
|
|
@ -630,6 +642,20 @@ onMounted(async () => {
|
||||||
{{ col.value }}
|
{{ col.value }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
<q-td auto-width>
|
||||||
|
<q-btn
|
||||||
|
v-if="!isReadonly"
|
||||||
|
size="12px"
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
dense
|
||||||
|
color="red"
|
||||||
|
class="q-ml-sm"
|
||||||
|
icon="mdi-delete-outline"
|
||||||
|
@click="deletePerson(props.row.personId)"
|
||||||
|
><q-tooltip>ลบผู้ถูกร้องเรียน</q-tooltip></q-btn
|
||||||
|
>
|
||||||
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
|
|
@ -662,6 +688,7 @@ onMounted(async () => {
|
||||||
dense
|
dense
|
||||||
class="text-weight-medium q-ml-sm"
|
class="text-weight-medium q-ml-sm"
|
||||||
keep-color
|
keep-color
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
|
|
@ -676,6 +703,7 @@ onMounted(async () => {
|
||||||
autoApply
|
autoApply
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
>
|
>
|
||||||
<template #year="{ year }">{{
|
<template #year="{ year }">{{
|
||||||
year + 543
|
year + 543
|
||||||
|
|
@ -761,6 +789,7 @@ onMounted(async () => {
|
||||||
autoApply
|
autoApply
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
>
|
>
|
||||||
<template #year="{ year }">{{
|
<template #year="{ year }">{{
|
||||||
year + 543
|
year + 543
|
||||||
|
|
@ -818,6 +847,7 @@ onMounted(async () => {
|
||||||
borderless
|
borderless
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
>
|
>
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
|
|
@ -866,6 +896,7 @@ onMounted(async () => {
|
||||||
borderless
|
borderless
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
>
|
>
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
|
|
@ -913,6 +944,7 @@ onMounted(async () => {
|
||||||
borderless
|
borderless
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
>
|
>
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
|
|
@ -961,6 +993,7 @@ onMounted(async () => {
|
||||||
borderless
|
borderless
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
>
|
>
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
|
|
@ -1087,6 +1120,7 @@ onMounted(async () => {
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกกรณีมีความผิด'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอกกรณีมีความผิด'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -1100,6 +1134,7 @@ onMounted(async () => {
|
||||||
label="สอบสวนที่"
|
label="สอบสวนที่"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกสอบสวนที่'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอกสอบสวนที่'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-select
|
<q-select
|
||||||
|
|
@ -1120,6 +1155,7 @@ onMounted(async () => {
|
||||||
lazy-rules
|
lazy-rules
|
||||||
group-label="group"
|
group-label="group"
|
||||||
group-values="options"
|
group-values="options"
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
>
|
>
|
||||||
</q-select>
|
</q-select>
|
||||||
|
|
||||||
|
|
@ -1136,6 +1172,7 @@ onMounted(async () => {
|
||||||
(val) => !!val || `${'กรุณากรอกอ้างอิงมาตราตามกฎหมาย'}`,
|
(val) => !!val || `${'กรุณากรอกอ้างอิงมาตราตามกฎหมาย'}`,
|
||||||
]"
|
]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -1150,6 +1187,7 @@ onMounted(async () => {
|
||||||
type="textarea"
|
type="textarea"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณากรอกสรุปพยานหลักฐานสนับสนุนข้อกล่าวหา'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณากรอกสรุปพยานหลักฐานสนับสนุนข้อกล่าวหา'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -1164,6 +1202,7 @@ onMounted(async () => {
|
||||||
type="textarea"
|
type="textarea"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณากรอกบันทึกถ้อยคำของผู้กล่าวหา'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณากรอกบันทึกถ้อยคำของผู้กล่าวหา'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -1178,6 +1217,7 @@ onMounted(async () => {
|
||||||
type="textarea"
|
type="textarea"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณากรอกพยานและบันทึกถ้อยคำพยาน'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณากรอกพยานและบันทึกถ้อยคำพยาน'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -1192,6 +1232,7 @@ onMounted(async () => {
|
||||||
type="textarea"
|
type="textarea"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณากรอกผลการสอบสวน'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณากรอกผลการสอบสวน'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div class="row col-12">
|
<div class="row col-12">
|
||||||
|
|
@ -1232,6 +1273,7 @@ onMounted(async () => {
|
||||||
@filter="(inputValue: any,
|
@filter="(inputValue: any,
|
||||||
doneFn: Function) => investigateDis.filterFnOptionsType(inputValue, doneFn, 'offenseDetailsOps'
|
doneFn: Function) => investigateDis.filterFnOptionsType(inputValue, doneFn, 'offenseDetailsOps'
|
||||||
)"
|
)"
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
><template v-slot:no-option>
|
><template v-slot:no-option>
|
||||||
<q-item>
|
<q-item>
|
||||||
<q-item-section class="text-grey">
|
<q-item-section class="text-grey">
|
||||||
|
|
@ -1265,6 +1307,7 @@ onMounted(async () => {
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
use-input
|
use-input
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
><template v-slot:no-option>
|
><template v-slot:no-option>
|
||||||
<q-item>
|
<q-item>
|
||||||
<q-item-section class="text-grey">
|
<q-item-section class="text-grey">
|
||||||
|
|
@ -1289,6 +1332,7 @@ onMounted(async () => {
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'เหตุผล'}`"
|
:label="`${'เหตุผล'}`"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1363,11 +1407,11 @@ onMounted(async () => {
|
||||||
<!-- Popup ผู้ถูกร้องเรียน -->
|
<!-- Popup ผู้ถูกร้องเรียน -->
|
||||||
<DialogAddPersonal
|
<DialogAddPersonal
|
||||||
title="ผู้ถูกร้องเรียน"
|
title="ผู้ถูกร้องเรียน"
|
||||||
:checkId="formData.persons"
|
|
||||||
:modal="modalPerson"
|
:modal="modalPerson"
|
||||||
btn-title="เพิ่มรายชื่อผู้ถูกสอบสวน"
|
btn-title="เพิ่มรายชื่อผู้ถูกสอบสวน"
|
||||||
:close="toggleModal"
|
:close="toggleModal"
|
||||||
:save="addPerson"
|
:save="addPerson"
|
||||||
|
:selected-data="mainStore.rowsAdd"
|
||||||
@returnData="handleSave"
|
@returnData="handleSave"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
@ -1387,4 +1431,4 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
<!-- :fecthlistappointment="fecthlistappointment" -->
|
<!-- :fecthlistappointment="fecthlistappointment" -->
|
||||||
</template>
|
</template>
|
||||||
@/modules/11_discipline/store/store
|
@/modules/11_discipline/store/store
|
||||||
|
|
|
||||||
|
|
@ -40,12 +40,15 @@ const props = defineProps({
|
||||||
type: Array,
|
type: Array,
|
||||||
default: [],
|
default: [],
|
||||||
},
|
},
|
||||||
|
checkedVal: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(["returnPerson"]);
|
const emit = defineEmits(["returnPerson"]);
|
||||||
/** หัวตาราง */
|
/** หัวตาราง */
|
||||||
|
|
||||||
|
|
||||||
const selected = ref<any>([]);
|
const selected = ref<any>([]);
|
||||||
const inspectionResults = ref<string>("");
|
const inspectionResults = ref<string>("");
|
||||||
const filter = ref<string>("");
|
const filter = ref<string>("");
|
||||||
|
|
@ -57,17 +60,16 @@ const initialPagination = ref<any>({
|
||||||
});
|
});
|
||||||
|
|
||||||
function onclickSend() {
|
function onclickSend() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
// success($q, `ส่งข้อมูล${props.title}สำเร็จ`);
|
// success($q, `ส่งข้อมูล${props.title}สำเร็จ`);
|
||||||
emit("returnPerson", selected.value);
|
emit("returnPerson", selected.value);
|
||||||
props.close?.();
|
props.close?.();
|
||||||
},
|
},
|
||||||
`ยืนยันการส่ง${props.title}`,
|
`ยืนยันการส่ง${props.title}`,
|
||||||
`ต้องการยืนยันการส่ง${props.title}หรือไม่`
|
`ต้องการยืนยันการส่ง${props.title}หรือไม่`
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onClickClose() {
|
function onClickClose() {
|
||||||
|
|
@ -78,7 +80,7 @@ watch([() => props.modal], () => {
|
||||||
inspectionResults.value = props.modal ? "" : "";
|
inspectionResults.value = props.modal ? "" : "";
|
||||||
selected.value = props.modal ? [] : [];
|
selected.value = props.modal ? [] : [];
|
||||||
if (props.modal === true) {
|
if (props.modal === true) {
|
||||||
selected.value = props.rows;
|
selected.value = props.checkedVal ? props.rows : [];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ interface Persons {
|
||||||
salary: number; //เงินเดือน
|
salary: number; //เงินเดือน
|
||||||
organization: string; //สังกัด
|
organization: string; //สังกัด
|
||||||
name: string;
|
name: string;
|
||||||
|
report?: boolean;
|
||||||
}
|
}
|
||||||
interface PersonsArray {
|
interface PersonsArray {
|
||||||
id: string; //id อ้างอิง profile
|
id: string; //id อ้างอิง profile
|
||||||
|
|
@ -23,6 +24,7 @@ interface PersonsArray {
|
||||||
salary: number; //เงินเดือน
|
salary: number; //เงินเดือน
|
||||||
organization: string; //สังกัด
|
organization: string; //สังกัด
|
||||||
name: string;
|
name: string;
|
||||||
|
report?: boolean;
|
||||||
}
|
}
|
||||||
interface Director {
|
interface Director {
|
||||||
directorId?: string;
|
directorId?: string;
|
||||||
|
|
@ -128,4 +130,4 @@ interface DisciplinaryRef {
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type { FormData, DisciplinaryRef, Persons, Director,PersonsArray };
|
export type { FormData, DisciplinaryRef, Persons, Director, PersonsArray };
|
||||||
|
|
|
||||||
|
|
@ -8,39 +8,40 @@ interface ListData {
|
||||||
investigationDateEnd: Date | null;
|
investigationDateEnd: Date | null;
|
||||||
investigationStatusResult: string;
|
investigationStatusResult: string;
|
||||||
status: string;
|
status: string;
|
||||||
createdAt: Date|null;
|
createdAt: Date | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ArrayPerson {
|
interface ArrayPerson {
|
||||||
id:string
|
personId: string;
|
||||||
idcard:string
|
idcard: string;
|
||||||
name:string
|
name: string;
|
||||||
prefix:string
|
prefix: string;
|
||||||
firstName:string
|
firstName: string;
|
||||||
lastName:string
|
lastName: string;
|
||||||
posNo:string
|
posNo: string;
|
||||||
position:string
|
position: string;
|
||||||
positionLevel:string
|
positionLevel: string;
|
||||||
salary:number|null
|
salary: number | null;
|
||||||
organization:string
|
organization: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ArrayPersonAdd {
|
interface ArrayPersonAdd {
|
||||||
personId:string
|
personId: string; //id อ้างอิง profile
|
||||||
idcard:string
|
idcard: string; //รหัสบัตรประชาชน
|
||||||
name:string
|
prefix: string; //คำนำหน้า
|
||||||
prefix:string
|
firstName: string; //ชื่อ
|
||||||
firstName:string
|
lastName: string; //นามสกุล
|
||||||
lastName:string
|
posNo: string; //เลขที่ตำแหน่ง
|
||||||
posNo:string
|
position: string; //ตำแหน่ง
|
||||||
position:string
|
positionLevel: string; //ระดับ
|
||||||
positionLevel:string
|
salary: number; //เงินเดือน
|
||||||
salary:number|null
|
organization: string; //สังกัด
|
||||||
organization:string
|
name: string;
|
||||||
|
report?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ocListType{
|
interface ocListType {
|
||||||
organizationId:string
|
organizationId: string;
|
||||||
organizationName:string
|
organizationName: string;
|
||||||
}
|
}
|
||||||
export type { ListData,ArrayPerson,ocListType,ArrayPersonAdd };
|
export type { ListData, ArrayPerson, ocListType, ArrayPersonAdd };
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { defineStore } from "pinia";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
||||||
import type { ArrayPerson, ArrayPersonAdd } from "@/modules/11_discipline/interface/response/investigate";
|
import type { ArrayPersonAdd } from "@/modules/11_discipline/interface/response/investigate";
|
||||||
|
|
||||||
export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
||||||
/** option ผู้ถูกสอบสวน*/
|
/** option ผู้ถูกสอบสวน*/
|
||||||
|
|
@ -273,8 +273,8 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
||||||
"organization",
|
"organization",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const rowsAdd = ref<ArrayPerson[]>([]);
|
const rowsAdd = ref<ArrayPersonAdd[]>([]);
|
||||||
function fetchData(data: ArrayPerson[]) {
|
function fetchData(data: ArrayPersonAdd[]) {
|
||||||
rowsAdd.value = data;
|
rowsAdd.value = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue