From abddd04570f37a78ba857e037c63ed924be0ed3a Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 17 Jul 2024 15:31:20 +0700 Subject: [PATCH] fix bug --- .../07_insignia/components/2_Manage/Tab1.vue | 18 +++++++++++++----- src/modules/14_KPI/views/round.vue | 14 ++++++++------ 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/src/modules/07_insignia/components/2_Manage/Tab1.vue b/src/modules/07_insignia/components/2_Manage/Tab1.vue index 257a12f12..9cff5b3e1 100644 --- a/src/modules/07_insignia/components/2_Manage/Tab1.vue +++ b/src/modules/07_insignia/components/2_Manage/Tab1.vue @@ -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(0); @@ -662,6 +666,9 @@ function clearForm() { dataPerson.level = ""; reason.value = ""; insigniaType.value = ""; + formFilter.page = 1; + formFilter.searchField = "citizenId"; + formFilter.searchKeyword = ""; } const insignia = ref(""); @@ -1227,8 +1234,9 @@ onMounted(async () => { - - เพิ่มรายชื่อ + +
@@ -1423,7 +1431,7 @@ onMounted(async () => { - + บันทึก diff --git a/src/modules/14_KPI/views/round.vue b/src/modules/14_KPI/views/round.vue index 82db03a65..c3cc28753 100644 --- a/src/modules/14_KPI/views/round.vue +++ b/src/modules/14_KPI/views/round.vue @@ -137,7 +137,6 @@ const formQuery = reactive({ keyword: "", }); const totalList = ref(1); -const year = ref(null); const formData = reactive({ 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(() => {
{ -