fix bug
This commit is contained in:
parent
1a273ccf5f
commit
abddd04570
2 changed files with 21 additions and 11 deletions
|
|
@ -274,11 +274,15 @@ function changtypeOc() {
|
|||
|
||||
/** function เพิ่มรายชื่อ*/
|
||||
async function clickmodalAdd() {
|
||||
await clearForm();
|
||||
let ocId = DataStore.typeOc ? DataStore.typeOc : DataStore.agency;
|
||||
// showLoader();
|
||||
await fecthInsignia();
|
||||
await fecthlistperson(ocId);
|
||||
clearForm();
|
||||
}
|
||||
|
||||
function onCloseModalAdd() {
|
||||
modalAdd.value = false;
|
||||
}
|
||||
|
||||
const maxPage = ref<number>(0);
|
||||
|
|
@ -662,6 +666,9 @@ function clearForm() {
|
|||
dataPerson.level = "";
|
||||
reason.value = "";
|
||||
insigniaType.value = "";
|
||||
formFilter.page = 1;
|
||||
formFilter.searchField = "citizenId";
|
||||
formFilter.searchKeyword = "";
|
||||
}
|
||||
|
||||
const insignia = ref<string>("");
|
||||
|
|
@ -1227,8 +1234,9 @@ onMounted(async () => {
|
|||
<!-- add -->
|
||||
<q-dialog v-model="modalAdd" persistent>
|
||||
<q-card style="width: 900px; max-width: 80vw">
|
||||
<q-toolbar class="q-py-md">
|
||||
<q-toolbar-title class="text-h6">เพิ่มรายชื่อ </q-toolbar-title>
|
||||
<DialogHeader tittle="เพิ่มรายชื่อ" :close="onCloseModalAdd" />
|
||||
<!-- <q-toolbar class="q-py-md">
|
||||
<q-toolbar-title class="text-h6"> </q-toolbar-title>
|
||||
|
||||
<q-btn
|
||||
icon="close"
|
||||
|
|
@ -1244,7 +1252,7 @@ onMounted(async () => {
|
|||
"
|
||||
style="color: #ff8080; background-color: #ffdede"
|
||||
/>
|
||||
</q-toolbar>
|
||||
</q-toolbar> -->
|
||||
<q-separator />
|
||||
<q-card-section class="q-pa-sm bg-grey-1">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
|
|
@ -1423,7 +1431,7 @@ onMounted(async () => {
|
|||
</q-card-section>
|
||||
<q-separator />
|
||||
<q-card-actions align="right">
|
||||
<q-btn dense unelevated label="บันทึก" color="public" @click="clickAdd">
|
||||
<q-btn unelevated label="บันทึก" color="public" @click="clickAdd">
|
||||
<q-tooltip>บันทึก</q-tooltip>
|
||||
</q-btn>
|
||||
</q-card-actions>
|
||||
|
|
|
|||
|
|
@ -137,7 +137,6 @@ const formQuery = reactive<FormQueryRound>({
|
|||
keyword: "",
|
||||
});
|
||||
const totalList = ref<number>(1);
|
||||
const year = ref<number | null>(null);
|
||||
const formData = reactive<FormRound>({
|
||||
durationKPI: "",
|
||||
year: null,
|
||||
|
|
@ -154,7 +153,7 @@ function fetchList() {
|
|||
http
|
||||
.get(
|
||||
config.API.kpiPeriod +
|
||||
`?page=${formQuery.page}&pageSize=${formQuery.pageSize}&keyword=${formQuery.keyword}&year=${year.value}`
|
||||
`?page=${formQuery.page}&pageSize=${formQuery.pageSize}&keyword=${formQuery.keyword}&year=${formQuery.year}`
|
||||
)
|
||||
.then((res) => {
|
||||
const data: ResRound[] = res.data.result.data;
|
||||
|
|
@ -366,7 +365,8 @@ onMounted(() => {
|
|||
<q-toolbar style="padding: 0px">
|
||||
<div class="row q-gutter-sm">
|
||||
<datepicker
|
||||
v-model="year"
|
||||
menu-class-name="modalfix"
|
||||
v-model="formQuery.year"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
year-picker
|
||||
|
|
@ -381,7 +381,9 @@ onMounted(() => {
|
|||
<q-input
|
||||
dense
|
||||
outlined
|
||||
:model-value="year === 0 ? 'ทั้งหมด' : Number(year) + 543"
|
||||
:model-value="
|
||||
formQuery.year === 0 ? 'ทั้งหมด' : Number(formQuery.year) + 543
|
||||
"
|
||||
:label="`${'ปีงบประมาณ'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
|
|
@ -392,11 +394,11 @@ onMounted(() => {
|
|||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
<template v-if="year" v-slot:append>
|
||||
<template v-if="formQuery.year" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="
|
||||
(year = 0), (formQuery.page = 1), fetchList()
|
||||
(formQuery.year = 0), (formQuery.page = 1), fetchList()
|
||||
"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue