From 27442c9c837e2258c1bcd51fdfb97711e9b113b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=80=E5=BD=A7?= <荀彧@gentronhealth.com> Date: Wed, 13 May 2026 20:31:06 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#508:=20[=E4=BD=8F=E9=99=A2?= =?UTF-8?q?=E6=8A=A4=E5=A3=AB=E7=AB=99-=E4=BD=8F=E9=99=A2=E8=AE=B0?= =?UTF-8?q?=E8=B4=A6-=E8=A1=A5=E8=B4=B9]=20=E7=82=B9=E5=87=BB"=E5=88=92?= =?UTF-8?q?=E4=BB=B7=E7=BB=84=E5=A5=97"=E6=8C=89=E9=92=AE=E6=97=A0?= =?UTF-8?q?=E4=BB=BB=E4=BD=95=E5=93=8D=E5=BA=94=EF=BC=8C=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E7=BB=84=E5=A5=97=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复搜索功能失效:loadGroupSets 未传递 groupSetSearchText 搜索关键字, 导致搜索框和搜索按钮点击后无任何过滤效果。新增客户端过滤逻辑, 在API返回数据后根据搜索关键字对组套名称进行过滤,同时保持searchKey 参数传递以便后端后续扩展支持。 Co-Authored-By: Claude Opus 4.7 --- .../InpatientBilling/components/FeeDialog.vue | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/openhis-ui-vue3/src/views/inpatientNurse/InpatientBilling/components/FeeDialog.vue b/openhis-ui-vue3/src/views/inpatientNurse/InpatientBilling/components/FeeDialog.vue index ba654b9c0..8cba9430f 100755 --- a/openhis-ui-vue3/src/views/inpatientNurse/InpatientBilling/components/FeeDialog.vue +++ b/openhis-ui-vue3/src/views/inpatientNurse/InpatientBilling/components/FeeDialog.vue @@ -771,15 +771,32 @@ function openGroupSetDialog() { function loadGroupSets() { groupSetLoading.value = true; - getOrderGroup({ organizationId: orgId.value }) + const params = { organizationId: orgId.value }; + // 传递搜索关键字,后端 /group-package-for-order 虽不直接支持 searchKey, + // 但保持参数传递以便后续扩展 + if (groupSetSearchText.value && groupSetSearchText.value.trim()) { + params.searchKey = groupSetSearchText.value.trim(); + } + getOrderGroup(params) .then((res) => { const data = res?.data || {}; + let rawList = []; if (groupSetRange.value === 1) { - groupSetList.value = data.personalList || []; + rawList = data.personalList || []; } else if (groupSetRange.value === 2) { - groupSetList.value = data.organizationList || []; + rawList = data.organizationList || []; } else { - groupSetList.value = data.hospitalList || []; + rawList = data.hospitalList || []; + } + // 客户端过滤:根据搜索关键字过滤组套名称 + const keyword = groupSetSearchText.value?.trim()?.toLowerCase(); + if (keyword) { + groupSetList.value = rawList.filter(item => { + const name = (item.name || item.Name || '').toLowerCase(); + return name.includes(keyword); + }); + } else { + groupSetList.value = rawList; } }) .catch(() => {