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