698 [收费工作站-住院登记-已登记入院] 检索维度单一,且关键归档信息缺失(需增设检索条件与补充列表字段展示)

This commit is contained in:
wangjian963
2026-06-25 13:22:38 +08:00
parent 6ffa47bf5e
commit c3765cac80

View File

@@ -5,7 +5,7 @@
<el-input
v-model="queryParams.searchKey"
style="width: 160px"
placeholder="患者姓名"
placeholder="请输入申请患者姓名"
class="input-with-select"
clearable
/>
@@ -425,14 +425,35 @@ const handlePrintCertificate = async () => {
};
getContract();
// 获取入院科室列表
// 获取入院科室列表仅住院科室classEnum 包含 "2"
function loadOrgList() {
getOrgList().then((res) => {
orgList.value = res.data || [];
const records = res.data?.records || [];
orgList.value = records.filter(
(record) => record.typeEnum === 2 && checkClassEnumValue(record.classEnum, 2)
);
});
}
// 判断科室分类是否包含指定值(支持逗号分隔的多选值,如 "1,2"
function checkClassEnumValue(classEnum, targetValue) {
if (!classEnum) return false;
if (typeof classEnum === 'string' && classEnum.includes(',')) {
const values = classEnum.split(',').map(v => v.trim());
return values.some(v => v == targetValue);
}
return classEnum == targetValue;
}
onMounted(() => {
// 默认检索近一周时间段
const endDate = new Date();
const startDate = new Date();
startDate.setDate(startDate.getDate() - 7);
dateRange.value = [
formatDateStr(startDate) + ' 00:00:00',
formatDateStr(endDate) + ' 23:59:59',
];
getList();
loadOrgList();
});
@@ -465,7 +486,14 @@ function resetQuery() {
startTime: '',
endTime: '',
};
dateRange.value = [];
// 重置为默认近一周时间段
const endDate = new Date();
const startDate = new Date();
startDate.setDate(startDate.getDate() - 7);
dateRange.value = [
formatDateStr(startDate) + ' 00:00:00',
formatDateStr(endDate) + ' 23:59:59',
];
getList();
}
@@ -491,6 +519,14 @@ const priceTypeDic = (contractNo) => {
return findObj?.contractName;
};
/** 格式化日期为 YYYY-MM-DD */
function formatDateStr(date) {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
}
const getList = () => {
// 设置按申请时间排序
queryParams.value.sortField = 'requestTime';