diff --git a/src/modules/11_discipline/components/1_Complaint/EditPage.vue b/src/modules/11_discipline/components/1_Complaint/EditPage.vue index 535b74d34..e81115f43 100644 --- a/src/modules/11_discipline/components/1_Complaint/EditPage.vue +++ b/src/modules/11_discipline/components/1_Complaint/EditPage.vue @@ -5,6 +5,7 @@ import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext. import { useRouter, useRoute } from "vue-router"; import { useQuasar } from "quasar"; import type { QTableProps } from "quasar"; + import config from "@/app.config"; import http from "@/plugins/http"; @@ -17,17 +18,16 @@ import { useCounterMixin } from "@/stores/mixin"; import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore"; import { useDisciplineMainStore } from "@/modules/11_discipline/store/main"; -const complainstStore = useComplainstDataStore(); const mainStore = useDisciplineMainStore(); const $q = useQuasar(); const mixin = useCounterMixin(); + const { dialogConfirm, showLoader, hideLoader, success, - messageError, - dialogMessageNotify, + messageError } = mixin; const router = useRouter(); const route = useRoute(); @@ -164,6 +164,7 @@ const visibleColumns = ref([ "organization", ]); +/** ดึงข้อมูล */ async function getData() { showLoader(); await http @@ -195,6 +196,7 @@ async function getData() { hideLoader(); }); } + /** ฟังชั่น แก้ไข */ async function onSubmit(data: any) { showLoader(); @@ -210,7 +212,6 @@ async function onSubmit(data: any) { getData(); hideLoader(); }); - // router.push(`/discipline/complaints`); } /** ยืนยัน มีมูลส่งไปสืบสวน */ @@ -227,6 +228,7 @@ function sentInvestigate() { } } +/** ส่งไปสืบสวน */ function sentConfirmNoPerson() { showLoader(); http @@ -244,6 +246,7 @@ function sentConfirmNoPerson() { }); } +/** ปิด dialog */ function closePopup() { modalPopup.value = false; } @@ -379,4 +382,4 @@ onMounted(() => { /> -@/modules/11_discipline/store/store \ No newline at end of file +@/modules/11_discipline/store/store diff --git a/src/modules/11_discipline/components/1_Complaint/Form.vue b/src/modules/11_discipline/components/1_Complaint/Form.vue index fcf4a757a..c60901c27 100644 --- a/src/modules/11_discipline/components/1_Complaint/Form.vue +++ b/src/modules/11_discipline/components/1_Complaint/Form.vue @@ -1,23 +1,21 @@ +
- -
{ /> สืบสวน
-
@@ -287,6 +252,7 @@ const monthYearThai = (val: DataDateMonthObject) => { /> +
@@ -306,6 +272,7 @@ const monthYearThai = (val: DataDateMonthObject) => {
{{ phone }}
+
{
+ { display: flex; justify-content: center; align-items: center; - /* border: 2px solid #17a259; */ - /* border-radius: 50%; - height: 25px; - width: 25px; - font-weight: bold; - color: white !important; - background: #17a259; */ } .fc-day-today .fc-daygrid-day-frame { diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/EditPage.vue b/src/modules/11_discipline/components/2_InvestigateFacts/EditPage.vue index 02b4f6390..9f6436e21 100644 --- a/src/modules/11_discipline/components/2_InvestigateFacts/EditPage.vue +++ b/src/modules/11_discipline/components/2_InvestigateFacts/EditPage.vue @@ -27,6 +27,7 @@ const { dialogConfirm, showLoader, success, hideLoader, messageError } = mixin; const route = useRoute(); const router = useRouter(); const id = ref(route.params.id as string); +const modalPopup = ref(false); /** ข้อมูล v-model ของฟอร์มสืบสวน */ const data = reactive({ @@ -161,7 +162,8 @@ function getData() { data.investigationStatusResult = dataList.investigationStatusResult; data.investigationExtendStatus = dataList.investigationExtendStatus; data.investigationDaysExtend = dataList.investigationDaysExtend; - data.investigationExtendHistory = dataList.investigationExtendHistory ?? []; + data.investigationExtendHistory = + dataList.investigationExtendHistory ?? []; // console.log(dataList); }) .catch((e) => { @@ -195,7 +197,6 @@ async function onSubmit(data: any) { // router.push(`/discipline/investigatefacts`); } -const modalPopup = ref(false); /** ยืนยัน ส่งไปสอบสวน */ function sentInvestigate() { if (mainStore.rowsAdd.length > 0) { @@ -341,6 +342,7 @@ watch( />
แก้ไขรายการสืบสวนข้อเท็จจริง
+
+ 0) { return { @@ -516,6 +521,7 @@ onMounted(async () => { +
- -
{ /> สอบสวน
-
diff --git a/src/modules/11_discipline/components/3_InvestigateDisciplinary/EditPage.vue b/src/modules/11_discipline/components/3_InvestigateDisciplinary/EditPage.vue index 64769165a..45c4a0b0b 100644 --- a/src/modules/11_discipline/components/3_InvestigateDisciplinary/EditPage.vue +++ b/src/modules/11_discipline/components/3_InvestigateDisciplinary/EditPage.vue @@ -2,12 +2,15 @@ import { onMounted, reactive, ref, watch } from "vue"; import { useQuasar } from "quasar"; import { useRouter, useRoute } from "vue-router"; + import http from "@/plugins/http"; import config from "@/app.config"; + /**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 { PersonsArray, Persons, @@ -17,10 +20,10 @@ import type { 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"; +import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue"; + /**import store*/ import { useCounterMixin } from "@/stores/mixin"; import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore"; @@ -42,6 +45,80 @@ const status = ref(""); const idInvestigate = ref(""); const idComplaint = ref(""); +const respondentRows = ref(); +const personObjComplaint = reactive({ + id: "", + personId: "", + idcard: "", + name: "", + prefix: "", + firstName: "", + lastName: "", + posNo: "", + position: "", + positionLevel: "", + salary: null, + organization: "", +}); + +const fileListObjComplaint = reactive({ + id: "", + pathName: "", + fileName: "", +}); + +const dataComplaints = reactive({ + id: "", + respondentType: "", + organizationId: "", + consideredAgency: "", + title: "", + description: "", + dateReceived: null, + dateConsideration: null, + offenseDetails: "", + levelConsideration: "", + dateNotification: null, + complaintFrom: "", + appellant: "", + documentFile: null, + status: "", + persons: [personObjComplaint], + result: "", + disciplineComplaintDocs: [fileListObjComplaint], +}); + +/** ข้อมูล v-model ของฟอร์มสืบสวน */ +const dataInvestigatefacts = reactive({ + id: "", + idComplaint: "", + investigationDetail: "", + complaint: "", + complaintdetail: "", + investigationDescription: "", + fault: "", + investigationDetailOther: "", + evidenceFiles: null, + fileComplaint: null, + investigationExtendStatus: false, + investigationDateStart: null, + investigationDateEnd: null, + investigationDaysExtend: null, + investigationStatusResult: "", + investigationCauseText: "", + complaintStatus: "", + result: "", + directors: [], + disciplineInvestigateDocs: [], + disciplineInvestigateRelevantDocs: [], + status: "", + documentFile: null, + respondentType: "", + organizationId: "", + persons: [], + investigationExtendHistory: [], +}); + /** function fetchData สอบสวนความผิดทางวินัย*/ async function fetchDetailDisciplinary() { showLoader(); @@ -168,12 +245,11 @@ async function onSubmitDisciplinary(data: any) { * บันทึกข้อมูลที่เเก้ไข * @param id ระบุ บุคคล */ -const onSubmit = async (id: string) => { +async function onSubmit(id: string) { router.push(`/discipline/disciplinary`); -}; +} /** ยืนยัน ส่งไปออกคำสั่ง */ -const respondentRows = ref(); async function sentIssue() { respondentRows.value = await store.rowSent.filter((x) => x.report === false); //x.report === false modalPopup.value = true; @@ -197,7 +273,7 @@ function confirmSentIssueGate() { messageError($q, e); }) .finally(() => { - router.push(`/discipline/disciplinary`) + router.push(`/discipline/disciplinary`); fetchDetailDisciplinary(); }); } @@ -234,7 +310,6 @@ function confirmEndInvestigate() { messageError($q, e); }) .finally(() => { - fetchDetailDisciplinary(); }); } @@ -258,52 +333,6 @@ function closePopup() { modalPopup.value = false; } -/** โหลดข้อมูลเมื่อเข้าหน้านี้ */ -onMounted(async () => { - store.tabMenu = "disciplinary"; - await fetchDetailDisciplinary(); -}); - -watch( - () => store.tabMenu, - async () => { - const fetchFunction = - store.tabMenu === "disciplinary" - ? fetchDetailDisciplinary - : store.tabMenu === "investigatefacts" - ? fetchDetailInvestigate - : store.tabMenu === "complaints" - ? fetchDetailComplaints - : null; - - if (fetchFunction) { - await fetchFunction(); - } - } -); - -/** ข้อมูล v-model ของฟอร์มเรื่องร้องเรียน */ -const personObjComplaint = reactive({ - id: "", - personId: "", - idcard: "", - name: "", - prefix: "", - firstName: "", - lastName: "", - posNo: "", - position: "", - positionLevel: "", - salary: null, - organization: "", -}); - -const fileListObjComplaint = reactive({ - id: "", - pathName: "", - fileName: "", -}); - function emitPerson(data: PersonsArray[]) { const dataMapId = data.map((item: PersonsArray) => item.id); showLoader(); @@ -324,62 +353,35 @@ function emitPerson(data: PersonsArray[]) { }); } -const dataComplaints = reactive({ - id: "", - respondentType: "", - organizationId: "", - consideredAgency: "", - title: "", - description: "", - dateReceived: null, - dateConsideration: null, - offenseDetails: "", - levelConsideration: "", - dateNotification: null, - complaintFrom: "", - appellant: "", - documentFile: null, - status: "", - persons: [personObjComplaint], - result: "", - disciplineComplaintDocs: [fileListObjComplaint], -}); +watch( + () => store.tabMenu, + async () => { + const fetchFunction = + store.tabMenu === "disciplinary" + ? fetchDetailDisciplinary + : store.tabMenu === "investigatefacts" + ? fetchDetailInvestigate + : store.tabMenu === "complaints" + ? fetchDetailComplaints + : null; -/** ข้อมูล v-model ของฟอร์มสืบสวน */ -const dataInvestigatefacts = reactive({ - id: "", - idComplaint: "", - investigationDetail: "", - complaint: "", - complaintdetail: "", - investigationDescription: "", - fault: "", - investigationDetailOther: "", - evidenceFiles: null, - fileComplaint: null, - investigationExtendStatus: false, - investigationDateStart: null, - investigationDateEnd: null, - investigationDaysExtend: null, - investigationStatusResult: "", - investigationCauseText: "", - complaintStatus: "", - result: "", - directors: [], - disciplineInvestigateDocs: [], - disciplineInvestigateRelevantDocs: [], - status: "", - documentFile: null, - respondentType: "", - organizationId: "", - persons: [], - investigationExtendHistory:[] + if (fetchFunction) { + await fetchFunction(); + } + } +); + +/** โหลดข้อมูลเมื่อเข้าหน้านี้ */ +onMounted(async () => { + store.tabMenu = "disciplinary"; + await fetchDetailDisciplinary(); }); +
{
+
{ + {
+
{
+
@@ -967,6 +978,7 @@ onMounted(async () => {
+
{ +
{
+
{ @update:model-value="changeFormData()" />
+
{ >
+
{ @update:model-value="changeFormData()" />
+
{ @update:model-value="changeFormData()" />
+