เครื่องราช จัดการคำขอ
This commit is contained in:
parent
b347fd064e
commit
cf449123e5
5 changed files with 18 additions and 94 deletions
|
|
@ -750,12 +750,10 @@ function filterSelector(val: string, update: Function, name: string) {
|
||||||
update(() => {
|
update(() => {
|
||||||
const needle = val.toLowerCase();
|
const needle = val.toLowerCase();
|
||||||
if (name === "typeinsigniaOptions") {
|
if (name === "typeinsigniaOptions") {
|
||||||
DataStore.typeinsignia = "";
|
|
||||||
typeinsigniaOptions.value = DataStore.typeinsigniaOptions.filter(
|
typeinsigniaOptions.value = DataStore.typeinsigniaOptions.filter(
|
||||||
(v: OptionData) => v.name.toLowerCase().indexOf(needle) > -1
|
(v: OptionData) => v.name.toLowerCase().indexOf(needle) > -1
|
||||||
);
|
);
|
||||||
} else if (name === "employeeClassOps") {
|
} else if (name === "employeeClassOps") {
|
||||||
DataStore.employeeClass = "";
|
|
||||||
employeeClassOps.value = DataStore.employeeClassOps.filter(
|
employeeClassOps.value = DataStore.employeeClassOps.filter(
|
||||||
(v: OptionData) => v.name.toLowerCase().indexOf(needle) > -1
|
(v: OptionData) => v.name.toLowerCase().indexOf(needle) > -1
|
||||||
);
|
);
|
||||||
|
|
@ -832,6 +830,8 @@ onMounted(async () => {
|
||||||
option-label="name"
|
option-label="name"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
use-input
|
use-input
|
||||||
|
hide-selected
|
||||||
|
fill-input
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:readonly="false"
|
:readonly="false"
|
||||||
:borderless="false"
|
:borderless="false"
|
||||||
|
|
@ -846,7 +846,6 @@ onMounted(async () => {
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
|
||||||
standout
|
standout
|
||||||
dense
|
dense
|
||||||
v-model="filterKeyword"
|
v-model="filterKeyword"
|
||||||
|
|
@ -856,13 +855,7 @@ onMounted(async () => {
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon v-if="filterKeyword == ''" name="search" />
|
<q-icon name="search" />
|
||||||
<q-icon
|
|
||||||
v-if="filterKeyword !== ''"
|
|
||||||
name="clear"
|
|
||||||
class="cursor-pointer"
|
|
||||||
@click="resetFilter"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
||||||
|
|
@ -878,7 +871,6 @@ onMounted(async () => {
|
||||||
:options="columns"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<q-card bordered class="q-pa-sm col-12 bg-grey-1 q-mt-sm">
|
<q-card bordered class="q-pa-sm col-12 bg-grey-1 q-mt-sm">
|
||||||
|
|
@ -896,6 +888,8 @@ onMounted(async () => {
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
use-input
|
use-input
|
||||||
|
hide-selected
|
||||||
|
fill-input
|
||||||
:readonly="false"
|
:readonly="false"
|
||||||
:borderless="false"
|
:borderless="false"
|
||||||
:outlined="true"
|
:outlined="true"
|
||||||
|
|
@ -940,6 +934,8 @@ onMounted(async () => {
|
||||||
emit-value
|
emit-value
|
||||||
use-input
|
use-input
|
||||||
map-options
|
map-options
|
||||||
|
hide-selected
|
||||||
|
fill-input
|
||||||
option-label="name"
|
option-label="name"
|
||||||
:options="employeeClassOps"
|
:options="employeeClassOps"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@ const props = defineProps({
|
||||||
});
|
});
|
||||||
|
|
||||||
const organization = ref<string>("1");
|
const organization = ref<string>("1");
|
||||||
const organizationOptions = ref<OptionData[]>([{ id: "1", name: "ทั้งหมด" }]);
|
|
||||||
const filterOrganizationOP = ref<OptionData[]>([]); //หน่วยงาน
|
const filterOrganizationOP = ref<OptionData[]>([]); //หน่วยงาน
|
||||||
const typeinsigniaOptions = ref<OptionData[]>(DataStore.typeinsigniaOptions); //ประเภทเครื่องราย
|
const typeinsigniaOptions = ref<OptionData[]>(DataStore.typeinsigniaOptions); //ประเภทเครื่องราย
|
||||||
const employeeClassOps = ref<OptionData[]>(DataStore.employeeClassOps); //ประเภทข้ารายกาช
|
const employeeClassOps = ref<OptionData[]>(DataStore.employeeClassOps); //ประเภทข้ารายกาช
|
||||||
|
|
@ -226,12 +225,10 @@ function filterSelector(val: string, update: Function, name: string) {
|
||||||
update(() => {
|
update(() => {
|
||||||
const needle = val.toLowerCase();
|
const needle = val.toLowerCase();
|
||||||
if (name === "typeinsigniaOptions") {
|
if (name === "typeinsigniaOptions") {
|
||||||
DataStore.typeinsignia = "";
|
|
||||||
typeinsigniaOptions.value = DataStore.typeinsigniaOptions.filter(
|
typeinsigniaOptions.value = DataStore.typeinsigniaOptions.filter(
|
||||||
(v: OptionData) => v.name.toLowerCase().indexOf(needle) > -1
|
(v: OptionData) => v.name.toLowerCase().indexOf(needle) > -1
|
||||||
);
|
);
|
||||||
} else if (name === "employeeClassOps") {
|
} else if (name === "employeeClassOps") {
|
||||||
DataStore.employeeClass = "";
|
|
||||||
employeeClassOps.value = DataStore.employeeClassOps.filter(
|
employeeClassOps.value = DataStore.employeeClassOps.filter(
|
||||||
(v: OptionData) => v.name.toLowerCase().indexOf(needle) > -1
|
(v: OptionData) => v.name.toLowerCase().indexOf(needle) > -1
|
||||||
);
|
);
|
||||||
|
|
@ -312,7 +309,6 @@ watch(
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
|
||||||
standout
|
standout
|
||||||
dense
|
dense
|
||||||
v-model="filterKeyword"
|
v-model="filterKeyword"
|
||||||
|
|
@ -322,13 +318,7 @@ watch(
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon v-if="filterKeyword == ''" name="search" />
|
<q-icon name="search" />
|
||||||
<q-icon
|
|
||||||
v-if="filterKeyword !== ''"
|
|
||||||
name="clear"
|
|
||||||
class="cursor-pointer"
|
|
||||||
@click="resetFilter"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
||||||
|
|
@ -344,7 +334,6 @@ watch(
|
||||||
:options="columns"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<q-card bordered class="q-pa-sm col-12 bg-grey-1 q-mt-sm">
|
<q-card bordered class="q-pa-sm col-12 bg-grey-1 q-mt-sm">
|
||||||
|
|
@ -361,6 +350,8 @@ watch(
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
use-input
|
use-input
|
||||||
|
hide-selected
|
||||||
|
fill-input
|
||||||
:readonly="false"
|
:readonly="false"
|
||||||
:borderless="false"
|
:borderless="false"
|
||||||
:outlined="true"
|
:outlined="true"
|
||||||
|
|
@ -404,6 +395,8 @@ watch(
|
||||||
:label="`${'สถานภาพ'}`"
|
:label="`${'สถานภาพ'}`"
|
||||||
emit-value
|
emit-value
|
||||||
use-input
|
use-input
|
||||||
|
hide-selected
|
||||||
|
fill-input
|
||||||
map-options
|
map-options
|
||||||
option-label="name"
|
option-label="name"
|
||||||
:options="employeeClassOps"
|
:options="employeeClassOps"
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ import { onMounted, ref, watch } from "vue";
|
||||||
|
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
|
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
|
||||||
import { useroleUserDataStore } from "@/stores/roleUser";
|
|
||||||
|
|
||||||
/** import Type*/
|
/** import Type*/
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
@ -15,7 +14,6 @@ import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||||
|
|
||||||
/** useStore*/
|
/** useStore*/
|
||||||
const DataStore = useInsigniaDataStore();
|
const DataStore = useInsigniaDataStore();
|
||||||
const roleDataStore = useroleUserDataStore();
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
tab: {
|
tab: {
|
||||||
|
|
@ -151,6 +149,7 @@ const visibleColumns = ref<string[]>([
|
||||||
"insigniaType",
|
"insigniaType",
|
||||||
"insigniaSend",
|
"insigniaSend",
|
||||||
"insigniaLevel",
|
"insigniaLevel",
|
||||||
|
"dateSend",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/** function เลือกหน่วยงาน */
|
/** function เลือกหน่วยงาน */
|
||||||
|
|
@ -185,10 +184,7 @@ function updatemodalPersonal(modal: boolean) {
|
||||||
/** ข้อมูล Table*/
|
/** ข้อมูล Table*/
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
const filterRef = ref<any>(null);
|
const filterRef = ref<any>(null);
|
||||||
const resetFilter = () => {
|
|
||||||
filterKeyword.value = "";
|
|
||||||
filterRef.value.focus();
|
|
||||||
};
|
|
||||||
const pagination = ref({
|
const pagination = ref({
|
||||||
sortBy: "name",
|
sortBy: "name",
|
||||||
descending: false,
|
descending: false,
|
||||||
|
|
@ -226,12 +222,10 @@ function filterSelector(val: string, update: Function, name: string) {
|
||||||
update(() => {
|
update(() => {
|
||||||
const needle = val.toLowerCase();
|
const needle = val.toLowerCase();
|
||||||
if (name === "typeinsigniaOptions") {
|
if (name === "typeinsigniaOptions") {
|
||||||
DataStore.typeinsignia = "";
|
|
||||||
typeinsigniaOptions.value = DataStore.typeinsigniaOptions.filter(
|
typeinsigniaOptions.value = DataStore.typeinsigniaOptions.filter(
|
||||||
(v: OptionData) => v.name.toLowerCase().indexOf(needle) > -1
|
(v: OptionData) => v.name.toLowerCase().indexOf(needle) > -1
|
||||||
);
|
);
|
||||||
} else if (name === "employeeClassOps") {
|
} else if (name === "employeeClassOps") {
|
||||||
DataStore.employeeClass = "";
|
|
||||||
employeeClassOps.value = DataStore.employeeClassOps.filter(
|
employeeClassOps.value = DataStore.employeeClassOps.filter(
|
||||||
(v: OptionData) => v.name.toLowerCase().indexOf(needle) > -1
|
(v: OptionData) => v.name.toLowerCase().indexOf(needle) > -1
|
||||||
);
|
);
|
||||||
|
|
@ -313,7 +307,6 @@ watch(
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
|
||||||
standout
|
standout
|
||||||
dense
|
dense
|
||||||
v-model="filterKeyword"
|
v-model="filterKeyword"
|
||||||
|
|
@ -323,13 +316,7 @@ watch(
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon v-if="filterKeyword == ''" name="search" />
|
<q-icon name="search" />
|
||||||
<q-icon
|
|
||||||
v-if="filterKeyword !== ''"
|
|
||||||
name="clear"
|
|
||||||
class="cursor-pointer"
|
|
||||||
@click="resetFilter"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
||||||
|
|
@ -345,7 +332,6 @@ watch(
|
||||||
:options="columns"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<q-card bordered class="q-pa-sm col-12 bg-grey-1 q-mt-sm">
|
<q-card bordered class="q-pa-sm col-12 bg-grey-1 q-mt-sm">
|
||||||
|
|
|
||||||
|
|
@ -183,6 +183,7 @@ onMounted(async () => {
|
||||||
await fetchData();
|
await fetchData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
รายการรอบการเสนอขอพระราชทานเครื่องราชอิสริยาภรณ์
|
รายการรอบการเสนอขอพระราชทานเครื่องราชอิสริยาภรณ์
|
||||||
|
|
@ -205,7 +206,6 @@ onMounted(async () => {
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
|
||||||
standout
|
standout
|
||||||
dense
|
dense
|
||||||
v-model="filterKeyword"
|
v-model="filterKeyword"
|
||||||
|
|
@ -236,9 +236,7 @@ onMounted(async () => {
|
||||||
map-options
|
map-options
|
||||||
:options="columns"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
|
@ -252,7 +250,6 @@ onMounted(async () => {
|
||||||
bordered
|
bordered
|
||||||
:paging="true"
|
:paging="true"
|
||||||
dense
|
dense
|
||||||
class="custom-header-table"
|
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="visibleColumns"
|
||||||
v-model:pagination="pagination"
|
v-model:pagination="pagination"
|
||||||
>
|
>
|
||||||
|
|
@ -324,7 +321,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
<q-td v-for="col in props.cols" :key="col.id">
|
<q-td v-for="col in props.cols" :key="col.id">
|
||||||
<div>
|
<div>
|
||||||
{{ col.value }}
|
{{ col.value ?? "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
|
|
@ -360,51 +357,4 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scope>
|
<style lang="scss" scope></style>
|
||||||
.filter-card {
|
|
||||||
background-color: #f1f1f1b0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle-expired-account {
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 15px;
|
|
||||||
line-height: 150%;
|
|
||||||
color: #35373c;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-color {
|
|
||||||
color: #4154b3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-header-table {
|
|
||||||
max-height: 64vh;
|
|
||||||
|
|
||||||
.q-table tr:nth-child(odd) td {
|
|
||||||
background: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.q-table tr:nth-child(even) td {
|
|
||||||
background: #f8f8f8;
|
|
||||||
}
|
|
||||||
|
|
||||||
.q-table thead tr {
|
|
||||||
background: #ecebeb;
|
|
||||||
}
|
|
||||||
|
|
||||||
.q-table thead tr th {
|
|
||||||
position: sticky;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* this will be the loading indicator */
|
|
||||||
.q-table thead tr:last-child th {
|
|
||||||
/* height of all previous header rows */
|
|
||||||
top: 48px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.q-table thead tr:first-child th {
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import { useQuasar } from "quasar";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
|
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
|
||||||
import { useroleUserDataStore } from "@/stores/roleUser";
|
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue