From 294d7a5d11f48c152041d60ce18c8e12ab19ab85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=B3=E7=BE=BD?= <关羽@gentronhealth.com> Date: Wed, 13 May 2026 20:06:15 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#499:=20=E3=80=90=E4=BD=8F=E9=99=A2?= =?UTF-8?q?=E5=8C=BB=E7=94=9F=E5=B7=A5=E4=BD=9C=E7=AB=99-=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E7=94=B3=E8=AF=B7=E3=80=91=E6=A3=80=E6=9F=A5=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E5=88=97=E8=A1=A8=E7=BC=BA=E5=A4=B1=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=B8=8D=E7=AC=A6?= =?UTF-8?q?=E5=90=88=E4=B8=B4=E5=BA=8A=E9=AB=98=E6=95=88=E6=A3=80=E7=B4=A2?= =?UTF-8?q?=E8=A6=81=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- .../examination/examinationApplication.vue | 126 +++++++++++++++++- 1 file changed, 124 insertions(+), 2 deletions(-) diff --git a/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue b/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue index 14fa2b0fb..e6f1b3904 100755 --- a/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue @@ -3,15 +3,56 @@
- 检查项目 ({{ applicationList.length }}) + 检查项目 ({{ filteredApplicationList.length }})
新增 保存
+ + +
+ + + + + + + + + + + + + + 搜索 + 重置 + + +
+ { + let result = applicationList.value; + + // 日期范围过滤 + if (searchForm.dateRange && searchForm.dateRange.length === 2) { + const start = searchForm.dateRange[0]; + const end = searchForm.dateRange[1]; + result = result.filter(item => { + const d = item.applyTime; + if (!d) return false; + const dateStr = d.length > 10 ? d.substring(0, 10) : d; + return dateStr >= start && dateStr <= end; + }); + } + + // 状态过滤 + if (searchForm.applyStatus !== '' && searchForm.applyStatus !== null && searchForm.applyStatus !== undefined) { + result = result.filter(item => item.applyStatus === searchForm.applyStatus); + } + + // 关键字过滤(申请单号、申检部位、检查项目名) + if (searchForm.keyword) { + const kw = searchForm.keyword.toLowerCase(); + result = result.filter(item => { + return (item.applyNo || '').toLowerCase().includes(kw) + || (item.inspectionArea || '').toLowerCase().includes(kw); + }); + } + + return result; +}); + +// Bug #499: 搜索与重置 +function handleSearch() { + // 过滤逻辑由 computed 自动处理 +} + +function handleResetSearch() { + const now = new Date(); + const end = now.toISOString().substring(0, 10); + const start = new Date(now.getTime() - 7 * 24 * 60 * 60 * 1000).toISOString().substring(0, 10); + searchForm.dateRange = [start, end]; + searchForm.applyStatus = ''; + searchForm.keyword = ''; +} + +// 初始化默认日期范围为近一周 +handleResetSearch(); + // 🔧 BugFix#426: 懒加载套餐明细 async function loadPackageDetails(row, treeNode, resolve) { if (!row.isPackage || !row.packageId) { @@ -1443,6 +1552,19 @@ defineExpose({ getList }); gap: 8px; } +/* Bug #499: 查询过滤工具栏 */ +.search-toolbar { + margin-bottom: 10px; + padding: 8px 0; + border-bottom: 1px solid #ebeef5; +} +.search-toolbar :deep(.el-form-item) { + margin-bottom: 8px; +} +.search-toolbar :deep(.el-form-item__label) { + font-size: 12px; +} + /* 底部区域:左表单 + 右分类 */ .bottom-section { display: flex;