รายการอุทธรณ์ร้องทุกข์

This commit is contained in:
setthawutttty 2023-12-14 10:18:04 +07:00
parent c65ac3cba6
commit 50b8f028b6
10 changed files with 885 additions and 207 deletions

View file

@ -3,12 +3,13 @@ import { ref } from "vue";
import { useCounterMixin } from "@/stores/mixin";
import type { QTableProps } from "quasar";
import type { DataOption } from '@/modules/11_discipline/interface/index/Main'
import type { MainList, RowList } from '@/modules/11_discipline/interface/response/appealComplain'
import type { MainList, RowList,RowAddList } from '@/modules/11_discipline/interface/response/appealComplain'
export const useAppealComplainStore = defineStore(
"AppealComplainStore",
() => {
const rows = ref<RowList[]>([]);
const rowsAdd = ref<RowAddList[]>([]);
const visibleColumns = ref<string[]>([]);
const columns = ref<QTableProps["columns"]>([]);
@ -17,29 +18,51 @@ export const useAppealComplainStore = defineStore(
function fetchAppealComplain(data: MainList[]) {
let dataList: RowList[] = data.map((e: MainList) => ({
id: e.id,
type: e.type,
profileId: e.profileId,
type: typeConvert(e.type),
title: e.title,
name: `${e.prefix}${e.firstName} ${e.lastName}`,
prefix: e.prefix,
firstName: e.firstName,
lastName: e.lastName,
idCard: e.idCard,
description: e.description,
year: e.year,
fullname: e.fullname,
citizenId: e.citizenId,
caseType: e.caseType,
caseNo: e.caseNo,
dateEdit: date2Thai(e.dateEdit),
caseNumber: e.caseNumber,
lastUpdatedAt: date2Thai(e.lastUpdatedAt),
status: statusTothai(e.status),
}));
rows.value = dataList;
}
function getRow(data:RowAddList[]){
if(data){
rowsAdd.value = data
}
}
const statusTothai = (val: string) => {
switch (val) {
case "NEW":
return "ใหม่";
case "STOP":
return "ยุติเรื่อง";
case "SEND_INVESTIGATE":
return "มีมูลส่งไปสืบสวนแล้ว";
case "RECEIVE_DOC":
return "ได้รับเอกสารแล้ว";
case "RECEIVE_APPEAL":
return "รับอุทธรณ์/ร้องทุกข์";
case "NO_RECEIVE_APPEAL":
return "ไม่รับอุทธรณ์/ร้องทุกข์";
case "DIAGNOSTIC":
return "ตั้งองค์คณะวินิจฉัย";
case "SUMMARY":
return "สรุปผลการพิจารณา";
case "DONE":
return "ปิดคำร้อง";
default:
return "-";
}
};
const typeConvert = (val: string) => {
switch (val) {
case "APPEAL":
return "อุทธรณ์";
case "COMPLAIN":
return "ร้องทุกข์";
default:
return "-";
}
@ -54,13 +77,14 @@ export const useAppealComplainStore = defineStore(
])
const statusOptions = ref<DataOption[]>([
{ id: "ALL", name: "ทั้งหมด" },
{ id: "NEW", name: "ใหม่" },
{ id: "xx1", name: "ได้รับเอกสารแล้ว" },
{ id: "xx2", name: "รับอุทธรณ์/ร้องทุกข์" },
{ id: "xx3", name: "ไม่รับอุทธรณ์/ร้องทุกข์" },
{ id: "xx4", name: "ตั้งองค์คณะวินิจฉัย" },
{ id: "xx5", name: "สรุปผลการพิจารณา" },
{ id: "xx6", name: "ปิดคำร้อง" },
{ id: "RECEIVE_DOC", name: "ได้รับเอกสารแล้ว" },
{ id: "RECEIVE_APPEAL", name: "รับอุทธรณ์/ร้องทุกข์" },
{ id: "NO_RECEIVE_APPEAL", name: "ไม่รับอุทธรณ์/ร้องทุกข์" },
{ id: "DIAGNOSTIC", name: "ตั้งองค์คณะวินิจฉัย" },
{ id: "SUMMARY", name: "สรุปผลการพิจารณา" },
{ id: "DONE", name: "ปิดคำร้อง" },
]);
// function filterSelector(val: string, update: Function, type: string) {
@ -91,6 +115,8 @@ export const useAppealComplainStore = defineStore(
typeOptions,
statusOptions,
fiscalyearOP,
getRow,
rowsAdd
};
}
);