การลา ลง เวลา select/input

This commit is contained in:
setthawutttty 2024-12-02 16:15:34 +07:00
parent f81b69b828
commit fc1f6acb9d
10 changed files with 27 additions and 29 deletions

View file

@ -129,7 +129,7 @@ async function fetchListTimeRecord() {
status: filetStatus.value, //*
page: page.value, //*
pageSize: rowsPerPage.value, //*
keyword: keyword.value, //keyword
keyword: keyword.value.trim(), //keyword
};
showLoader();
await http

View file

@ -123,6 +123,8 @@ function calculateMaxDate() {
label="สถานะ"
use-input
v-model="filetStatus"
hide-selected
fill-input
:options="option"
@update:model-value="filterFn"
@filter="filterOptionFn"
@ -172,7 +174,6 @@ function calculateMaxDate() {
map-options
:options="workStore.columns"
option-value="name"
/>
</div>
</div>

View file

@ -35,6 +35,7 @@ const querySting = reactive<QuerySting>({
//** API*/
async function fecthLeaveList() {
leaveStore.rows = [];
querySting.keyword = querySting.keyword.trim()
querySting.status = await (querySting.status == null
? "ALL"
: querySting.status);

View file

@ -37,6 +37,7 @@ const querySting = reactive<QuerySting>({
//** API*/
async function fecthLeaveList() {
leaveStore.rows = [];
querySting.keyword = querySting.keyword.trim()
querySting.status = await (querySting.status == null
? "ALL"
: querySting.status);

View file

@ -22,7 +22,6 @@ const props = defineProps({
getList: Function,
});
/** Option*/
const optionTypeMain = ref<DataOption[]>([]);
const optionType = ref<DataOption[]>([]);
@ -156,6 +155,8 @@ watch(
emit-value
map-options
outlined
hide-selected
fill-input
dense
v-model="querySting.type"
:options="optionType"
@ -175,18 +176,15 @@ watch(
</q-item>
</template>
<template
v-if="
querySting.type !== '00000000-0000-0000-0000-000000000000'
"
v-if="querySting.type !== '00000000-0000-0000-0000-000000000000'"
v-slot:append
>
<q-icon
name="cancel"
@click.stop.prevent="
(optionType = optionTypeMain),
(querySting.type =
'00000000-0000-0000-0000-000000000000'),
props.getSearch?.()
(querySting.type = '00000000-0000-0000-0000-000000000000'),
props.getSearch?.()
"
class="cursor-pointer"
/>
@ -199,6 +197,8 @@ watch(
emit-value
map-options
outlined
hide-selected
fill-input
dense
v-model="querySting.status"
:options="optionStatus"
@ -239,7 +239,11 @@ watch(
v-model="querySting.keyword"
label="ค้นหา"
@keydown.enter.prevent="props.getSearch?.()"
/>
>
<template v-slot:append>
<q-icon name="search" />
</template>
</q-input>
</div>
<div class="col-xs-12 col-sm-3 col-md-2">
<q-select
@ -255,7 +259,6 @@ watch(
style="min-width: 140px"
:options="leaveStore.columns"
option-value="name"
/>
</div>
</div>

View file

@ -152,13 +152,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>
@ -183,7 +177,7 @@ onMounted(async () => {
ref="table"
:columns="dataStore.columns"
:rows="dataStore.rows"
:filter="filterKeyword"
:filter="filterKeyword.trim()"
row-key="interrogated"
flat
bordered

View file

@ -257,7 +257,7 @@ async function fetchData() {
await http
.get(
config.API.specialTime() +
`?year=${year.value}&month=${month.value}&page=${pagination.value.page}&pageSize=${pagination.value.rowsPerPage}&keyword=${filterKeyword.value}`
`?year=${year.value}&month=${month.value}&page=${pagination.value.page}&pageSize=${pagination.value.rowsPerPage}&keyword=${filterKeyword.value.trim()}`
)
.then(async (res) => {
let data = res.data.result.data;
@ -376,13 +376,7 @@ onMounted(async () => {
@keydown.enter.prevent="getSearch()"
>
<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>

View file

@ -234,6 +234,8 @@ onMounted(() => {
label="สถานภาพ"
emit-value
map-options
hide-selected
fill-input
option-label="name"
option-value="id"
use-input
@ -256,6 +258,8 @@ onMounted(() => {
:options="yearTypeOptionOption"
emit-value
map-options
hide-selected
fill-input
option-label="name"
option-value="id"
use-input

View file

@ -18,7 +18,7 @@ import type {
ArrayPerson,
ArrayFileList,
} from "@/modules/11_discipline/interface/request/complaint";
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/investigateFact";
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/InvestigateFact";
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //

View file

@ -15,7 +15,7 @@ import type {
ArrayPerson,
ArrayFileList,
} from "@/modules/11_discipline/interface/request/complaint";
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/investigateFact";
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/InvestigateFact";
import DialogSendToCommand from "@/modules/11_discipline/components/4_Result/DialogSendToCommand.vue";
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //