เรื่องร้องเรียน
This commit is contained in:
parent
e9b7cddf09
commit
7f3dfafe33
11 changed files with 539 additions and 342 deletions
|
|
@ -2,62 +2,88 @@
|
|||
import { onMounted, reactive, ref } from "vue";
|
||||
import Form from "@/modules/11_discipline/components/1_Complaint/Form.vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import type { FormData } from "@/modules/11_discipline/interface/request/complaint";
|
||||
import type {
|
||||
FormData,
|
||||
ArrayPerson,
|
||||
} from "@/modules/11_discipline/interface/request/complaint";
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const id = ref<string>(route.params.id as string);
|
||||
|
||||
/** ข้อมูล v-model ของฟอร์ม */
|
||||
const personOj = reactive<ArrayPerson>({
|
||||
idcard: "",
|
||||
name: "",
|
||||
position: "",
|
||||
positionLevel: "",
|
||||
educationQualification: "",
|
||||
organization: "",
|
||||
});
|
||||
const data = reactive<FormData>({
|
||||
complainantType: "",
|
||||
complainant: "",
|
||||
respondentType: "",
|
||||
office: "",
|
||||
agency: "",
|
||||
topicComplaint: "",
|
||||
detail: "",
|
||||
datereceive: null,
|
||||
dateconsideration: null,
|
||||
offenseDescription: "",
|
||||
considerationLevel: "",
|
||||
datewarn: null,
|
||||
receivecomplaints: "",
|
||||
petitioner: "",
|
||||
files: null,
|
||||
consideredAgency: "",
|
||||
title: "",
|
||||
description: "",
|
||||
dateReceived: null,
|
||||
dateConsideration: null,
|
||||
offenseDetails: "",
|
||||
levelConsideration: "",
|
||||
dateNotification: null,
|
||||
complaintFrom: "",
|
||||
appellant: "",
|
||||
documentFile: null,
|
||||
complaintStatus: "",
|
||||
organizationId: "",
|
||||
persons: [personOj],
|
||||
personId:[],
|
||||
respondentId:[]
|
||||
});
|
||||
|
||||
/** ดึงค่าจาก api */
|
||||
const fetchData = async () => {
|
||||
data.complainantType = "2"
|
||||
data.complainant = "1"
|
||||
data.office = "0"
|
||||
data.agency = "2"
|
||||
data.topicComplaint = "test"
|
||||
data.detail = "test"
|
||||
data.datereceive = new Date("2023-11-07T14:58:00")
|
||||
data.dateconsideration = new Date("2023-11-07T14:58:00")
|
||||
data.offenseDescription = "0"
|
||||
data.considerationLevel = "0"
|
||||
data.datewarn = new Date("2023-11-07T14:58:00")
|
||||
data.receivecomplaints = "0"
|
||||
data.petitioner = "test"
|
||||
data.files = ""
|
||||
data.respondentType = "PERSON";
|
||||
data.office = "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: "นางศิรินภา คงน้อย",
|
||||
position: "ธุรการ",
|
||||
positionLevel: "ต้น",
|
||||
educationQualification: "ปริญญาตรี",
|
||||
organization: "สกจ.",
|
||||
},
|
||||
]
|
||||
};
|
||||
|
||||
/** ฟังชั่น แก้ไข */
|
||||
async function onSubmit() {
|
||||
console.log("edit");
|
||||
router.push(`/discipline/complaints`);
|
||||
};
|
||||
}
|
||||
|
||||
/** เรียกใช้งาน ฟังชั่น ตอนเริ่มโหลดหน้า */
|
||||
onMounted(() => {
|
||||
console.log(data);
|
||||
fetchData();
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
<div class="col-xs-12 col-sm-12 col-md-11">
|
||||
<div class="toptitle col-12 row items-center">
|
||||
<div class="toptitle col-12 row items-end">
|
||||
<q-btn
|
||||
icon="mdi-arrow-left"
|
||||
unelevated
|
||||
|
|
@ -68,7 +94,25 @@ onMounted(() => {
|
|||
class="q-mr-sm"
|
||||
@click="$router.push(`/discipline/complaints`)"
|
||||
/>
|
||||
แก้ไขเรื่องร้องเรียน {{ id }}#id
|
||||
<div class="q-ma-none">แก้ไขเรื่องร้องเรียน {{ id }}#id</div>
|
||||
<q-space />
|
||||
<div class="q-gutter-x-sm">
|
||||
<q-btn
|
||||
v-if="data.complaintStatus === 'NEW'"
|
||||
label="มีมูลส่งไปสืบสวน"
|
||||
color="public"
|
||||
/>
|
||||
<q-btn
|
||||
v-if="data.complaintStatus === 'NEW'"
|
||||
label="ยุติเรื่อง"
|
||||
color="red-7"
|
||||
/>
|
||||
<q-btn
|
||||
v-if="data.complaintStatus === 'STOP'"
|
||||
label="ยกเลิกการยุติเรื่อง"
|
||||
color="red-7"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Form :on-submit="onSubmit" :data="data" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue