From 46cd97fb50a2b570b129a9a53f06b0cfec7cccee Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Fri, 29 Sep 2023 13:54:17 +0700 Subject: [PATCH] filter input --- .../components/3_result/DialogForm.vue | 20 ++- .../components/3_result/Dialogbody.vue | 24 ++- .../components/4_Allocate/DialogForm.vue | 26 +++- .../components/4_Allocate/Main.vue | 2 +- .../components/5_Borrow/DialogForm.vue | 60 +++++++- .../07_insignia/components/5_Borrow/Main.vue | 140 ++++++++++++++---- .../components/report/Report_02.vue | 20 ++- 7 files changed, 243 insertions(+), 49 deletions(-) diff --git a/src/modules/07_insignia/components/3_result/DialogForm.vue b/src/modules/07_insignia/components/3_result/DialogForm.vue index 7270f401e..2555ecbc8 100644 --- a/src/modules/07_insignia/components/3_result/DialogForm.vue +++ b/src/modules/07_insignia/components/3_result/DialogForm.vue @@ -40,7 +40,7 @@ const affiliationReceived = ref(""); const receivedate = ref(); const announceDate = ref(); const invoiceDate = ref(null); - +const filterinsigniaOp2 = ref(DataStore.insigniaOp2) const employeeClass = ref(""); const employeeClassOps = ref([ { id: "officer", name: "ข้าราชการ กทม.สามัญ" }, @@ -276,6 +276,19 @@ const searchcardid = () => { } else notifyError($q, "ไม่พบข้อมูลเลขบัตรประชาชนนี้"); } }; +const filterSelector = (val: any, update: Function, name: any) => { + update(() => { + const needle = val.toLowerCase(); + if (name === 'insigniaOp2') { + brand.value = '' + filterinsigniaOp2.value = DataStore.insigniaOp2.filter( + (v: any) => v.name.toLowerCase().indexOf(needle) > -1 + ); + } + + } + ) +}