From 72c0ceac29cfd93088979377912f28b8873819c3 Mon Sep 17 00:00:00 2001 From: zhaoyun Date: Wed, 22 Apr 2026 17:29:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=89=8D=E7=AB=AFBug?= =?UTF-8?q?=20#405=20#406=20#408?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - #405 住院医生站:医嘱保存后仍可编辑(未锁定) - #406 门诊医生站:检验申请保存失败患者信息未加载 - #408 门诊医生站:检查明细标签页显示暂无数据 --- .../examination/examinationApplication.vue | 2 ++ .../inspection/inspectionApplication.vue | 16 ++++++++++++++++ .../home/components/order/index.vue | 5 +++++ 3 files changed, 23 insertions(+) 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 bd359914..4022acd5 100644 --- a/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue @@ -890,6 +890,8 @@ function handleRowClick(row) { syncCategoryChecked(); // Bug #384修复: 回充后更新检查方法显示 updateMethodDisplay(); + // 修复【#408】:加载申请单详情后自动切换到检查明细页签,确保已加载的明细数据可见 + activeDetailTab.value = 'applyDetail'; } catch (err) { console.error('加载申请单详情失败', err); ElMessage.error('加载申请单详情失败'); diff --git a/openhis-ui-vue3/src/views/doctorstation/components/inspection/inspectionApplication.vue b/openhis-ui-vue3/src/views/doctorstation/components/inspection/inspectionApplication.vue index 99c12772..df2d9393 100644 --- a/openhis-ui-vue3/src/views/doctorstation/components/inspection/inspectionApplication.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/inspection/inspectionApplication.vue @@ -1521,6 +1521,18 @@ const handleSave = () => { let hasErrors = false + // 修复【#406】:保存前尝试从 props 同步患者信息,避免因加载时序导致信息缺失 + if ((!formData.patientName?.trim() || !formData.medicalrecordNumber?.trim()) && props.patientInfo && props.patientInfo.encounterId) { + formData.patientName = props.patientInfo.patientName || '' + formData.medicalrecordNumber = props.patientInfo.identifierNo || '' + formData.encounterId = props.patientInfo.encounterId || '' + formData.visitNo = props.patientInfo.busNo || '' + formData.patientId = props.patientInfo.patientId || '' + formData.applyDepartment = props.patientInfo.organizationName || '' + formData.applyDeptCode = props.patientInfo.organizationName || '' + formData.applyOrganizationId = props.patientInfo.orgId || '' + } + // P0:检查患者信息是否已加载 if (!formData.patientName?.trim() || !formData.medicalrecordNumber?.trim()) { ElMessage.error('患者信息未加载,请稍后重试') @@ -2036,6 +2048,10 @@ watch(() => selectedInspectionItems.value, async (newVal) => { onMounted(async () => { await loadExecuteDepartmentList() await loadInspectionData() + // 修复【#406】:挂载时如果已有patientInfo但watch未触发initData,则手动调用 + if (props.patientInfo && props.patientInfo.encounterId && !formData.encounterId) { + await initData() + } }) // 组件卸载时清除定时器 diff --git a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/index.vue b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/index.vue index 92c6a14e..e7dd0519 100644 --- a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/index.vue +++ b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/index.vue @@ -1423,6 +1423,11 @@ function handleSaveBatch() { .then((res) => { if (res.code === 200) { proxy.$modal.msgSuccess('保存成功'); + // 修复【#405】:保存成功后重置所有待保存行的 isEdit 为 false,锁定医嘱不再编辑 + saveList.forEach(item => { + const row = prescriptionList.value.find(r => r.uniqueKey === item.uniqueKey); + if (row) row.isEdit = false; + }); getListInfo(false); nextId.value == 1; isSaving.value = false;