แก้ไข TAB เครื่องราชฯ ปรับ Table

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-09-07 16:05:25 +07:00
parent b18056a335
commit a1bd65f1ca
13 changed files with 87 additions and 10 deletions

View file

@ -225,6 +225,7 @@ onMounted(async () => {
"officer",
props.tab
);
DataStore.mainTab = props.tab;
}
}
});

View file

@ -157,6 +157,7 @@ onMounted(async () => {
"officer",
props.tab
);
DataStore.mainTab = props.tab;
}
}
});

View file

@ -143,6 +143,7 @@ const columns = ref<QTableProps["columns"]>([
},
]);
onMounted(async () => {
organizationOptions.value = DataStore.optionsTypeOc;
organization.value = await (DataStore.agency != null
? DataStore.agency
@ -156,6 +157,7 @@ onMounted(async () => {
"officer",
props.tab
);
DataStore.mainTab = props.tab;
}
}
});

View file

@ -5,10 +5,12 @@ import { useQuasar } from "quasar";
import type { QTableProps } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
const $q = useQuasar();
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError } = mixin;
const DataStore = useInsigniaDataStore();
const props = defineProps({
roundId: {
type: String,
@ -44,6 +46,7 @@ const rows = ref<any[]>([]);
onMounted(async () => {
await fecthOrg();
DataStore.mainTab = props.tab;
});
watch(props, async () => {
if (props.tab === "organization") {

View file

@ -30,7 +30,7 @@ const round = ref<string>("");
const roundName = ref<string>("");
const optionRound = ref<any>([]);
const optiontypeOc = ref<any>([]);
const tab = ref<any>("pending");
const tab = ref<any>("");
const stat = ref<any>({
allUserUser: 0,
orgAllCount: 0,
@ -39,6 +39,7 @@ const stat = ref<any>({
});
onMounted(async () => {
tab.value = DataStore.mainTab;
await checkRole();
await fecthlistRound();
});

View file

@ -408,6 +408,7 @@ const searchcardid = () => {
borderless
:enableTimePicker="false"
week-start="0"
:readonly="disbleStatus || status == 'DONE'"
>
<template #year="{ year }">
{{ year + 543 }}
@ -495,6 +496,7 @@ const searchcardid = () => {
borderless
:enableTimePicker="false"
week-start="0"
:readonly="disbleStatus || status == 'DONE'"
>
<template #year="{ year }">
{{ year + 543 }}

View file

@ -94,11 +94,16 @@ const fecthInsignia = async () => {
};
const fecthInsigniaType = async () => {
console.log(DataStore.mainTab);
await http(config.API.insigniaType)
.then((res) => {
let data = res.data.result;
DataStore.fetchDatainsigniaType(data);
tab.value = DataStore.insigniaType[0].name;
if (DataStore.mainTab) {
tab.value = DataStore.mainTab;
} else tab.value = DataStore.insigniaType[0].name;
loadView.value = true;
fecthInsignia();
})
@ -177,6 +182,7 @@ const selectorRound = (round: string) => {
};
const fecthlistInsignia = async () => {
DataStore.mainTab = tab.value;
showLoader();
await http
.get(config.API.insigniaManageType(tab.value, Number(roundYear.value)))

View file

@ -114,6 +114,9 @@ const visibleColumns = ref<String[]>([
"name",
"type",
"employeeType",
"date",
"volumeNo",
"section",
"page",
"number",
"vatnumber",
@ -155,6 +158,15 @@ const columns = ref<QTableProps["columns"]>([
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "employeeType",
align: "left",
label: "สถานภาพ",
field: "employeeType",
sortable: true,
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "type",
align: "left",
@ -165,10 +177,38 @@ const columns = ref<QTableProps["columns"]>([
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "employeeType",
name: "dateReceive",
align: "left",
label: "สถานภาพ",
field: "employeeType",
label: "วันที่ได้รับพระราชทาน",
field: "dateReceive",
sortable: true,
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "date",
align: "left",
label: "วันที่ในราชกิจนุเบกษา",
field: "date",
sortable: true,
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "volumeNo",
align: "left",
label: "เล่มที่ในราชกิจนุเบกษา",
field: "volumeNo",
sortable: true,
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "section",
align: "left",
label: "ตอนที่ในราชกิจนุเบกษา",
field: "section",
sortable: true,
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),