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;