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