เครื่องราช จัดการคำขอ
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">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue