10 Commits

Author SHA1 Message Date
关羽
3ee09b22c7 Fix Bug #511: [住院医生工作站-临床医嘱] 护士退回的医嘱在医生站双击无法进入编辑模式,导致无法修改重发
- 使用 Number() 做 statusEnum 类型转换并用 === 严格比较,避免前后端类型不一致导致双击无响应
- 使用 splice 替代直接赋值更新 prescriptionList,确保 Vue 响应式系统能正确触发渲染更新
- 使用 nextTick 包裹 expandOrder 设置,确保数据更新后再设置展开状态,保证 el-table 正确识别 row-key
- 增加 findIndex 返回 -1 时的错误处理,给用户可见提示而非静默失败
2026-05-15 01:28:18 +08:00
关羽
6b4f897b9c Fix Bug #509: [门诊医生站-手术申请] 提交申请后列表未实时刷新展示数据,且提示语需优化
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 01:09:52 +08:00
关羽
848a55cf23 Fix Bug #507: [住院护士站-住院记账-补费] 项目单位未获取、执行科室显示内码且缺乏默认/模糊搜索逻辑
根因分析:
1. 执行科室显示内码:loadDepartmentOptions 只读取树形结构的第一层(records[0].children),
   但后端返回的是多层嵌套的树形数据。修复为递归扁平化 flattenTree() 提取所有科室节点。
2. 单位字段为空:getUnitCodeOptions 中 unitCode_dictText/minUnitCode_dictText 为 null 时,
   option 的 codeText 为 null 导致 el-select 无法显示。修复为 fallback 到 code 值本身。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 01:08:23 +08:00
荀彧
4ae4421827 Fix Bug #498: 【住院医生工作站-检查申请】检查申请列表状态筛选HAVING子句与SELECT映射不一致导致筛选失败
SELECT的CASE映射将status_enum=4映射为3(待接收),但HAVING子句将status_enum=4映射为4,
导致按"待接收"或"已接收"状态筛选时无结果返回。同时修正status_enum=5/6/7的映射从5→7。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 00:27:01 +08:00
关羽
4138dc39f6 Fix Bug #495: 【医嘱闭环】已校对医嘱无法流转至"医嘱执行"界面,导致费用无法提交执行
后端SQL查询未过滤requestStatus(医嘱请求状态),导致医嘱执行页面的"待执行"tab
返回所有状态医嘱而非仅返回已校对(status=3)的医嘱。修复方式:
1. AdviceProcessAppMapper.java: 新增requestStatus参数
2. AdviceProcessAppMapper.xml: 在med_medication_request和wor_service_request子查询的
   WHERE条件中增加 AND T1.status_enum = #{requestStatus} 过滤
3. AdviceProcessAppServiceImpl.java: 保存requestStatus并传递给mapper,
   替代原注释"后端SQL已通过CASE条件处理"的错误假设

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 00:21:55 +08:00
荀彧
718e7a90c5 Fix Bug #497: 【住院医生工作站-检查申请】检查申请列表调整"申请单状态"列位置至申请单号后
将列表中的"申请单状态"列从申请者列之后移至申请单号之后,使列顺序为:申请单号→申请单状态→申请者→操作,与检验申请列表保持一致。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 00:14:59 +08:00
荀彧
68c682ad49 Fix Bug #508: [住院护士站-住院记账-补费] 点击"划价组套"按钮无任何响应,无法选择组套项目
根因分析:FeeDialog组件模板有两个根元素(两个el-dialog),在Vue 3中虽支持多根组件,
但Element Plus的嵌套el-dialog配合append-to-body在多根场景下可能出现渲染/挂载问题。

修复方案:
1. 将两个el-dialog包裹在单一根<div>中,确保组件挂载行为与项目中其他正常工作的嵌套弹窗一致
2. 内层弹窗增加destroy-on-close,确保每次打开时DOM完全重建,避免残留状态导致的不显示问题

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 00:13:04 +08:00
荀彧
c7368db889 Fix Bug #500: 【门诊医生站】检查申请右侧"检查项目分类"切换时,界面出现明显抖动/闪烁
根因分析:
1. el-collapse-item__content 上的 transition: height/max-height 0.3s 与 Element Plus
   内部 accordion 动画冲突,造成"双重动画"效果,表现为切换分类时高度跳变
2. collapse-scroll 的 min-height: 120px 过小,切换内容较少的分类时容器收缩导致布局抖动
3. 分类内"加载中..."提示使用 v-if,出现/消失时引起 collapse content 高度突变

修复策略:
- 移除 el-collapse-item__content 和 el-collapse-item 的自定义 transition 属性,
  让 el-collapse 使用原生动画,消除双重动画
- 增大 collapse-scroll 的 min-height 从 120px 到 350px,确保切换时容器不收缩
- 将加载提示的 v-if 改为 v-show,避免 DOM 插入/移除引起高度跳变

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 00:02:32 +08:00
荀彧
e64370bb67 Fix Bug #486: [住院医生工作站-临床医嘱] 医嘱检索框不支持全局模糊搜索,未选"医嘱类型"时检索结果为空
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 23:18:55 +08:00
关羽
078439245b Fix Bug #488: 【临床医嘱】双击编辑待签发医嘱,医嘱类型回显为数字且点击确认报接口错误
问题1-医嘱类型回显为数字: 编辑待签发医嘱时,当行的adviceType值(如3/诊疗)
不在当前adviceTypeList选项列表中时,el-select会回显为纯数字。
修复:新增hasAdviceTypeOption和getAdviceTypeLabel函数,当类型无匹配选项时
显示el-tag标签而非空下拉框,避免数字回显。

问题2-点击确认报itemNo接口错误: getBindDevice接口调用无catch处理,
接口失败时promise rejection阻断主流程保存。
修复:为getBindDevice调用链添加.catch()静默降级,确保绑定设备接口失败
不影响医嘱主流程保存。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 23:12:33 +08:00
9 changed files with 98 additions and 49 deletions

View File

@@ -178,7 +178,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
inpatientAdviceParam.setEncounterIds(null);
Integer exeStatus = inpatientAdviceParam.getExeStatus();
inpatientAdviceParam.setExeStatus(null);
// requestStatus由前端tab控制后端SQL已通过CASE条件处理校对状态过滤无需再作为SQL条件
Integer requestStatus = inpatientAdviceParam.getRequestStatus();
inpatientAdviceParam.setRequestStatus(null);
// 构建查询条件
QueryWrapper<InpatientAdviceParam> queryWrapper
@@ -198,7 +198,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
ParticipantType.ADMITTING_DOCTOR.getCode(), AccountType.PERSONAL_CASH_ACCOUNT.getCode(),
ChargeItemStatus.BILLABLE.getValue(), ChargeItemStatus.BILLED.getValue(),
ChargeItemStatus.REFUNDED.getValue(), EncounterClass.IMP.getValue(),
GenerateSource.DOCTOR_PRESCRIPTION.getValue());
GenerateSource.DOCTOR_PRESCRIPTION.getValue(), requestStatus);
inpatientAdvicePage.getRecords().forEach(e -> {
// 是否皮试
e.setSkinTestFlag_enumText(EnumUtils.getInfoByValue(Whether.class, e.getSkinTestFlag()));

View File

@@ -69,5 +69,6 @@ public interface AdviceProcessAppMapper {
@Param("active") Integer active, @Param("bed") Integer bed, @Param("admittingDoctor") String admittingDoctor,
@Param("personalCashAccount") String personalCashAccount, @Param("billable") Integer billable,
@Param("billed") Integer billed, @Param("refunded") Integer refunded, @Param("imp") Integer imp,
@Param("doctorPrescription") Integer doctorPrescription);
@Param("doctorPrescription") Integer doctorPrescription,
@Param("requestStatus") Integer requestStatus);
}

View File

@@ -290,6 +290,7 @@
WHERE T1.delete_flag = '0'
AND T1.refund_medicine_id IS NULL
AND T1.generate_source_enum = #{doctorPrescription}
AND T1.status_enum = #{requestStatus}
AND CASE WHEN T1.status_enum = #{draft}
THEN T1.performer_check_id IS NOT NULL
ELSE 1=1 END
@@ -422,6 +423,7 @@
AND af.delete_flag = '0'
WHERE T1.delete_flag = '0'
AND T1.generate_source_enum = #{doctorPrescription}
AND T1.status_enum = #{requestStatus}
AND CASE WHEN T1.status_enum = #{draft}
THEN T1.performer_check_id IS NOT NULL
ELSE 1=1 END

View File

@@ -61,15 +61,14 @@
GROUP BY drf.id, drf.encounter_id, drf.prescription_no, drf.name, drf.desc_json,
drf.requester_id, drf.create_time, ap.name
<if test="status != null and status != ''">
HAVING CASE MIN(wsr.status_enum)
WHEN 1 THEN 0
WHEN 2 THEN 1
WHEN 3 THEN 4
WHEN 4 THEN 4
WHEN 5 THEN 5
WHEN 6 THEN 5
WHEN 7 THEN 5
WHEN 8 THEN 6
HAVING CASE
WHEN MIN(wsr.status_enum) = 1 THEN 0
WHEN MIN(wsr.status_enum) = 2 THEN 1
WHEN MIN(wsr.status_enum) = 3 AND MAX(CASE WHEN wsr.performer_check_id IS NOT NULL THEN 1 ELSE 0 END) = 1 THEN 2
WHEN MIN(wsr.status_enum) = 3 THEN 4
WHEN MIN(wsr.status_enum) = 4 THEN 3
WHEN MIN(wsr.status_enum) = 5 OR MIN(wsr.status_enum) = 6 OR MIN(wsr.status_enum) = 7 THEN 7
WHEN MIN(wsr.status_enum) = 8 THEN 6
ELSE NULL
END = #{status}::integer
</if>

View File

@@ -389,7 +389,8 @@
</el-checkbox>
<span class="item-price">¥{{ item.price }}/{{ item.unit || "" }}</span>
</div>
<div v-if="categoryLoadingSet.has(cat.typeId)" class="category-loading-hint">
<!-- Bug #500修复: 使用 v-show + 占位符,避免加载提示出现/消失时高度跳变 -->
<div v-show="categoryLoadingSet.has(cat.typeId)" class="category-loading-hint">
加载中...
</div>
<!-- Bug #428修复: 渲染分类联动加载的检查方法列表 -->
@@ -1804,8 +1805,8 @@ defineExpose({ getList });
.collapse-scroll {
flex: 1;
overflow-y: auto;
overflow-x: hidden; /* Bug #500: 防止切换时水平方向溢出导致抖动 */
min-height: 120px; /* Bug #500: 固定最小高度,避免分类切换时 flex 容器高度突变 */
overflow-x: hidden;
min-height: 350px; /* Bug #500: 增大最小高度,确保切换分类时容器高度不会收缩导致抖动 */
}
.empty-hint {
color: #909399;
@@ -2119,18 +2120,18 @@ defineExpose({ getList });
height: auto;
line-height: 1.5;
}
/* Bug #500修复: 折叠内容使用明确属性过渡,避免 transition: all 导致子元素意外动画 */
/* Bug #500修复: 折叠内容不添加额外过渡动画,避免与 el-collapse 内部动画冲突导致双重动画/闪烁 */
:deep(.el-collapse-item__content) {
padding-bottom: 4px;
transition: height 0.3s ease, max-height 0.3s ease;
}
/* Bug #500: 折叠面板动画容器,添加 overflow:hidden 防止展开时内容溢出导致闪烁 */
/* Bug #500: 折叠面板容器不加 border保持简洁 */
:deep(.el-collapse-item__wrap) {
border: none;
overflow: hidden;
}
/* Bug #500: 分类项不加 margin 过渡,避免展开/收起时意外位移 */
:deep(.el-collapse-item) {
transition: margin 0.2s ease;
/* 不使用 transition,依赖 el-collapse 原生动画 */
}
/* Bug #500: 分类加载中提示样式 */
.category-loading-hint {

View File

@@ -1141,7 +1141,9 @@ function submitForm() {
// 保存麻醉方式
sessionStorage.setItem('anesthesiaType', form.value.anesthesiaTypeEnum)
open.value = false
// 由父组件 @saved 事件负责刷新列表(带延迟确保后端事务已提交)
// 子组件自身主动刷新列表(立即),确保数据展示不依赖父组件事件
getList()
// 通知父组件刷新医嘱列表(父组件也会带延迟再次刷新手术列表作为兜底)
emit('saved')
} else {
proxy.$modal.msgError(res.msg || '新增手术失败,请检查表单信息')
@@ -1158,6 +1160,8 @@ function submitForm() {
// 保存麻醉方式
sessionStorage.setItem('anesthesiaType', form.value.anesthesiaTypeEnum)
open.value = false
// 子组件自身主动刷新列表(立即)
getList()
// 由父组件 @saved 事件负责刷新列表
emit('saved')
} else {

View File

@@ -93,7 +93,6 @@
</el-table-column>
<el-table-column prop="createTime" label="创建时间" width="160" />
<el-table-column prop="prescriptionNo" label="申请单号" width="140" />
<el-table-column prop="requesterId_dictText" label="申请者" width="120" />
<el-table-column label="申请单状态" width="120" align="center">
<template #default="scope">
<el-tag :type="getStatusTagType(scope.row.status)" effect="plain" round>
@@ -101,6 +100,7 @@
</el-tag>
</template>
</el-table-column>
<el-table-column prop="requesterId_dictText" label="申请者" width="120" />
<el-table-column label="操作" width="280" align="center" fixed="right">
<template #default="scope">
<!-- 详情 - 所有状态都显示 -->

View File

@@ -142,6 +142,11 @@
<el-table-column label="医嘱" align="center" prop="productName" width="300">
<template #default="scope">
<template v-if="getRowDisabled(scope.row)">
<!-- 当行的 adviceType 不在当前选项列表中时显示标签而非下拉框 -->
<template v-if="!hasAdviceTypeOption(scope.row)">
<el-tag size="small" type="primary">{{ getAdviceTypeLabel(scope.row.adviceType) }}</el-tag>
</template>
<template v-else>
<el-select
style="width: 35%; margin-right: 8px"
:model-value="getRowSelectValue(scope.row)"
@@ -216,6 +221,7 @@
/>
</template>
</el-popover>
</template>
</template>
<span v-else>{{ scope.row.adviceName }}</span>
</template>
@@ -750,6 +756,31 @@ function getRowDisabled(row) {
return row.isEdit;
}
/**
* 判断行的 adviceType 是否在当前 adviceTypeList 选项中有匹配项
* 修复 Bug #488避免 el-select 因无匹配选项而回显为纯数字
*/
function hasAdviceTypeOption(row) {
if (!row.adviceType && row.adviceType !== 0) return false;
if (row.adviceType == 1 && row.categoryCode) {
const compositeValue = '1-' + row.categoryCode;
return adviceTypeList.value.some(item => item.value === compositeValue);
}
return adviceTypeList.value.some(item => item.value === row.adviceType);
}
/**
* 将原始 adviceType 数字映射为人类可读标签
* 修复 Bug #488当 adviceType 不在选项列表中时,显示标签而非数字
*/
function getAdviceTypeLabel(type) {
if (!type && type !== 0) return '';
// 优先使用字典文本(如果后端返回了 adviceType_dictText
// 但由于当前行数据可能没有 dictText提供兜底映射
const fallbackMap = { 1: '西药', 2: '中成药', 3: '诊疗', 4: '耗材', 5: '会诊', 6: '手术', 23: '检查' };
return fallbackMap[type] || String(type);
}
/**
* 将行的 adviceType + categoryCode 映射为 el-select 的选中值
* 药品子分类使用复合值如 '1-2'adviceType-categoryCode诊疗/手术/全部使用原始值
@@ -832,13 +863,22 @@ function clickRowDb(row, column, event) {
}
row.showPopover = false;
// 仅”待签发(statusEnum==1)”允许编辑;”已签发(statusEnum==2)”及之后状态不允许编辑
if (row.statusEnum == 1) {
// 使用 Number() 做类型转换,确保后端返回的数值能正确比较
if (Number(row.statusEnum) === 1) {
// 确保治疗类型为字符串,方便与单选框 label 对齐,默认为长期医嘱('1')
row.therapyEnum = String(row.therapyEnum ?? '1');
row.isEdit = true;
const index = prescriptionList.value.findIndex((item) => item.uniqueKey === row.uniqueKey);
prescriptionList.value[index] = row;
expandOrder.value = [row.uniqueKey];
if (index !== -1) {
prescriptionList.value.splice(index, 1, row);
// 使用 nextTick 确保数据更新后再设置展开状态,保证 el-table 能正确识别 row-key
nextTick(() => {
expandOrder.value = [row.uniqueKey];
});
} else {
console.warn('⚠️ clickRowDb 未找到匹配行: uniqueKey=', row.uniqueKey, ', row=', row);
proxy.$modal.msgWarning('无法进入编辑模式,请刷新列表后重试');
}
}
}
@@ -1376,6 +1416,9 @@ function handleSaveSign(row, index) {
bindMethod.value[itemNo] = true;
}
}
}).catch(() => {
// 绑定设备接口失败不影响主流程保存,静默降级
console.warn('绑定设备检查接口调用失败adviceType=' + row.adviceType + ', itemNo=' + itemNo + '');
});
}
}

View File

@@ -1,5 +1,6 @@
<template>
<el-dialog v-model="dialogVisible" title="补费" width="80%" :close-on-click-modal="false">
<div class="fee-dialog-wrapper">
<el-dialog v-model="dialogVisible" title="补费" width="80%" :close-on-click-modal="false">
<div style="font-size: 16px; font-weight: bold; margin-bottom: 10px">
患者信息{{
props.patientInfo.patientName +
@@ -251,7 +252,7 @@
</div>
</el-dialog>
<!-- 划价组套选择对话框 -->
<el-dialog v-model="groupSetDialogVisible" title="划价组套选择" width="600px" :close-on-click-modal="false" append-to-body :z-index="3000">
<el-dialog v-model="groupSetDialogVisible" title="划价组套选择" width="600px" :close-on-click-modal="false" append-to-body :z-index="3000" destroy-on-close>
<div style="margin-bottom: 15px; display: flex; align-items: center; gap: 10px">
<el-input
v-model="groupSetSearchText"
@@ -302,6 +303,7 @@
<el-button type="primary" @click="applyGroupSet" :disabled="!selectedGroupSet">应用</el-button>
</div>
</el-dialog>
</div>
</template>
<script setup>
@@ -519,31 +521,28 @@ watch(
}
);
// 加载科室选项(支持树形/扁平两种数据结构)
// 加载科室选项(递归扁平化树形结构)
function loadDepartmentOptions() {
getOrgList()
.then((res) => {
if (res.data) {
// 尝试从树形结构中取records[0].children
if (res.data.records && res.data.records.length > 0) {
if (res.data.records[0].children && res.data.records[0].children.length > 0) {
departmentOptions.value = res.data.records[0].children;
return;
}
// 如果 records[0] 有 id 和 name非树根节点直接用所有 records
if (res.data.records[0].id) {
departmentOptions.value = res.data.records;
return;
}
}
// 兜底:如果 records 不存在或为空,尝试直接使用 data 本身
if (Array.isArray(res.data)) {
departmentOptions.value = res.data;
return;
}
if (!res?.data?.records?.length) {
departmentOptions.value = [];
return;
}
// 所有方式都失败,置空
departmentOptions.value = [];
// 递归扁平化树形结构,提取所有科室节点
const flattenTree = (nodes) => {
const result = [];
for (const node of nodes) {
if (node?.id && node?.name) {
result.push(node);
}
if (node?.children?.length) {
result.push(...flattenTree(node.children));
}
}
return result;
};
departmentOptions.value = flattenTree(res.data.records);
})
.catch(() => {
console.warn('科室列表加载失败(可能无权限)');
@@ -609,13 +608,13 @@ function getUnitCodeOptions(row) {
const unitCodes = [];
// 大单位:优先用 codecode 缺失时用字典文本兜底
if (row.unitCode != null && String(row.unitCode) !== '') {
unitCodes.push({ code: String(row.unitCode), codeText: row.unitCode_dictText });
unitCodes.push({ code: String(row.unitCode), codeText: row.unitCode_dictText || String(row.unitCode) });
} else if (row.unitCode_dictText) {
unitCodes.push({ code: row.unitCode_dictText, codeText: row.unitCode_dictText });
}
// 小单位:同上
if (row.minUnitCode != null && String(row.minUnitCode) !== '') {
unitCodes.push({ code: String(row.minUnitCode), codeText: row.minUnitCode_dictText });
unitCodes.push({ code: String(row.minUnitCode), codeText: row.minUnitCode_dictText || String(row.minUnitCode) });
} else if (row.minUnitCode_dictText) {
unitCodes.push({ code: row.minUnitCode_dictText, codeText: row.minUnitCode_dictText });
}