ปรับ เรื่องร้องเรียน
This commit is contained in:
parent
cc2e45666e
commit
facadbd837
6 changed files with 73 additions and 14 deletions
|
|
@ -244,7 +244,6 @@ async function getData() {
|
||||||
data.persons = dataList.persons;
|
data.persons = dataList.persons;
|
||||||
data.result = dataList.result;
|
data.result = dataList.result;
|
||||||
data.disciplineComplaintDocs = dataList.disciplineComplaintDocs;
|
data.disciplineComplaintDocs = dataList.disciplineComplaintDocs;
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -272,7 +271,28 @@ async function onSubmit(data: any) {
|
||||||
|
|
||||||
/** ยืนยัน มีมูลส่งไปสืบสวน */
|
/** ยืนยัน มีมูลส่งไปสืบสวน */
|
||||||
function sentInvestigate() {
|
function sentInvestigate() {
|
||||||
modalPopup.value = true;
|
if (complainstStore.rowsAdd.length > 0) {
|
||||||
|
modalPopup.value = true;
|
||||||
|
} else {
|
||||||
|
dialogConfirm($q,()=>sentConfirm(),'ยืนยันส่งไปสืบสวน','ต้องการยืนยันยืนยันส่งไปสืบสวนใช่หรือไม่?')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function sentConfirm(){
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.put(config.API.complaintApprove(id.value), {
|
||||||
|
persons: [],
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
router.push(`/discipline/complaints`);
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function closePopup() {
|
function closePopup() {
|
||||||
|
|
|
||||||
|
|
@ -366,7 +366,7 @@ function confirmDelete(id: string) {
|
||||||
watch(props.data, async () => {
|
watch(props.data, async () => {
|
||||||
fileList.value = props.data.disciplineComplaintDocs;
|
fileList.value = props.data.disciplineComplaintDocs;
|
||||||
complainstStore.fetchComplainstAdd(props.data.persons);
|
complainstStore.fetchComplainstAdd(props.data.persons);
|
||||||
|
|
||||||
formData.id = props.data.id;
|
formData.id = props.data.id;
|
||||||
formData.respondentType = props.data.respondentType;
|
formData.respondentType = props.data.respondentType;
|
||||||
formData.organizationId = props.data.organizationId;
|
formData.organizationId = props.data.organizationId;
|
||||||
|
|
@ -403,20 +403,22 @@ function upLoadFileDoc() {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
router.push(`/discipline/complaints`);
|
props.getData();
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
|
formData.documentFile = null
|
||||||
});
|
});
|
||||||
console.log("file", formData.documentFile, formData.id);
|
console.log("file", formData.documentFile, formData.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function addPerson(data: any) {
|
async function addPerson(data: any) {
|
||||||
await complainstStore.fetchComplainstAdd(data);
|
|
||||||
toggleModal();
|
toggleModal();
|
||||||
|
console.log(data)
|
||||||
|
await complainstStore.fetchComplainstAdd(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getOc() {
|
function getOc() {
|
||||||
|
|
@ -425,6 +427,19 @@ function getOc() {
|
||||||
complainstStore.ocListFn(data);
|
complainstStore.ocListFn(data);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function deletePerson(id: string) {
|
||||||
|
dialogRemove($q, () => removePerson(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
function removePerson(id: string) {
|
||||||
|
const dataRow = complainstStore.rowsAdd;
|
||||||
|
const updatedRows = dataRow.filter((item: any) => item.id !== id);
|
||||||
|
success($q,'ลบข้อมูลสำเร็จ')
|
||||||
|
complainstStore.rowsAdd = updatedRows;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getOc();
|
getOc();
|
||||||
complainstStore.columns = columns.value;
|
complainstStore.columns = columns.value;
|
||||||
|
|
@ -575,6 +590,7 @@ onMounted(() => {
|
||||||
col.label
|
col.label
|
||||||
}}</span>
|
}}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
|
<q-th auto-width v-if="formData.status === 'NEW'"></q-th>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
|
|
@ -595,10 +611,29 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
{{ col.value }}
|
{{ col.value }}
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
v-else-if="col.name === 'organization'"
|
||||||
|
class="table_ellipsis"
|
||||||
|
>
|
||||||
|
{{ props.row.organization }}
|
||||||
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value }}
|
{{ col.value }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
<q-td auto-width v-if="formData.status === 'NEW'">
|
||||||
|
<q-btn
|
||||||
|
size="12px"
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
dense
|
||||||
|
color="red"
|
||||||
|
class="q-ml-sm"
|
||||||
|
icon="mdi-delete-outline"
|
||||||
|
@click="deletePerson(props.row.id)"
|
||||||
|
><q-tooltip>ลบผู้ถูกร้องเรียน</q-tooltip></q-btn
|
||||||
|
>
|
||||||
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
|
|
@ -978,6 +1013,7 @@ onMounted(() => {
|
||||||
><q-tooltip>ดาวน์โหลดไฟล์</q-tooltip></q-btn
|
><q-tooltip>ดาวน์โหลดไฟล์</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
v-if="formData.status === 'NEW'"
|
||||||
size="12px"
|
size="12px"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
|
|
@ -991,6 +1027,13 @@ onMounted(() => {
|
||||||
</q-item>
|
</q-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="fileList.length === 0">
|
||||||
|
<q-card class="bg-grey-4 q-ma-sm q-py-md" bordered>
|
||||||
|
<p class="text-subtitle1 text-center q-ma-none text-bold">
|
||||||
|
ไม่มีรายการเอกสาร
|
||||||
|
</p>
|
||||||
|
</q-card>
|
||||||
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,10 +60,6 @@ const initialPagination = ref<any>({
|
||||||
});
|
});
|
||||||
|
|
||||||
function onclickSend() {
|
function onclickSend() {
|
||||||
// inputRef.value.validate();
|
|
||||||
// dialogConfirm($q, () => props.sentApprove());
|
|
||||||
|
|
||||||
if (selected.value.length > 0) {
|
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
|
|
@ -75,9 +71,7 @@ function onclickSend() {
|
||||||
`ยืนยันการส่ง${props.title}`,
|
`ยืนยันการส่ง${props.title}`,
|
||||||
`ต้องการยืนยันการส่ง${props.title}หรือไม่`
|
`ต้องการยืนยันการส่ง${props.title}หรือไม่`
|
||||||
);
|
);
|
||||||
} else {
|
|
||||||
dialogMessageNotify($q, "กรุณาเลือกรายชื่อ");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onClickClose() {
|
function onClickClose() {
|
||||||
|
|
|
||||||
|
|
@ -177,6 +177,7 @@ watch(
|
||||||
class="custom-header-table"
|
class="custom-header-table"
|
||||||
:visible-columns="complainstStore.visibleColumns"
|
:visible-columns="complainstStore.visibleColumns"
|
||||||
v-model:pagination="pagination"
|
v-model:pagination="pagination"
|
||||||
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
>
|
>
|
||||||
<template v-slot:pagination="scope">
|
<template v-slot:pagination="scope">
|
||||||
<q-pagination
|
<q-pagination
|
||||||
|
|
|
||||||
|
|
@ -179,6 +179,7 @@ onMounted(async () => {
|
||||||
v-bind="attrs"
|
v-bind="attrs"
|
||||||
:visible-columns="dataInvestigate.visibleColumns"
|
:visible-columns="dataInvestigate.visibleColumns"
|
||||||
v-model:pagination="pagination"
|
v-model:pagination="pagination"
|
||||||
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
>
|
>
|
||||||
<template v-slot:pagination="scope">
|
<template v-slot:pagination="scope">
|
||||||
<q-pagination
|
<q-pagination
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,12 @@ interface DataListRow {
|
||||||
id: string;
|
id: string;
|
||||||
personId: string;
|
personId: string;
|
||||||
title: string;
|
title: string;
|
||||||
dateReceived: string;
|
dateReceived: string|null;
|
||||||
respondentType: string;
|
respondentType: string;
|
||||||
offenseDetails: string;
|
offenseDetails: string;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
levelConsideration: string;
|
levelConsideration: string;
|
||||||
dateConsideration: string;
|
dateConsideration: string |null;
|
||||||
status: string;
|
status: string;
|
||||||
}
|
}
|
||||||
interface DataAdd {
|
interface DataAdd {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue