From db83b97839a5d62dba7d50759bd93510043d3588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=8E=E4=BD=97?= Date: Wed, 17 Jun 2026 18:01:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(#783):=20=E8=AF=B7=E4=BF=AE=E5=A4=8D=20Bug?= =?UTF-8?q?=20#783=EF=BC=9A=E3=80=90=E4=BD=8F=E9=99=A2=E5=8C=BB=E7=94=9F?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=AB=99-=E8=AF=8A=E6=96=AD=E5=BD=95?= =?UTF-8?q?=E5=85=A5=E3=80=91=E6=96=B0=E5=A2=9E=E8=AF=8A=E6=96=AD=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=8F=AF=E4=BB=A5=E4=B8=8D=E4=BF=9D=E5=AD=98=E4=B8=80?= =?UTF-8?q?=E7=9B=B4=E6=96=B0=E5=A2=9E=E8=AF=8A=E6=96=AD=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E7=AC=A6=E5=90=88=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因: - Bug #请修复 Bug #783 存在的问题 修复: - 修改已应用。现在验证修改后的文件,确保语法正确: --- MD/MODULE_INDEX.md | 2 +- .../home/components/diagnosis/diagnosis.vue | 58 +++++--- .../components/prescriptionList.vue | 129 +++++++++--------- 3 files changed, 104 insertions(+), 85 deletions(-) diff --git a/MD/MODULE_INDEX.md b/MD/MODULE_INDEX.md index 873e8a687..ac26f3911 100644 --- a/MD/MODULE_INDEX.md +++ b/MD/MODULE_INDEX.md @@ -1,7 +1,7 @@ # HealthLink-HIS 代码模块索引 > 供 LLM 快速定位代码。每个模块列出 Controller → Service → Mapper 关键文件。 -> 最后更新: 2026-06-17 12:00 (301 个 Controller) +> 最后更新: 2026-06-17 18:00 (309 个 Controller) ## 关键词 → 模块速查 diff --git a/healthlink-his-ui/src/views/inpatientDoctor/home/components/diagnosis/diagnosis.vue b/healthlink-his-ui/src/views/inpatientDoctor/home/components/diagnosis/diagnosis.vue index ff88469d2..d4b98b46a 100755 --- a/healthlink-his-ui/src/views/inpatientDoctor/home/components/diagnosis/diagnosis.vue +++ b/healthlink-his-ui/src/views/inpatientDoctor/home/components/diagnosis/diagnosis.vue @@ -611,7 +611,22 @@ function handleImport() { if (!props.patientInfo || !props.patientInfo.encounterId) { return; } - + + // 检查是否已填写病历 + if (!allowAdd.value) { + proxy.$modal.msgWarning('请先填写病历'); + return; + } + + // 检查当前列表是否有未保存的诊断,阻止重复新增 + const hasUnsaved = (form.value.diagnosisList || []).some( + (item) => !item.conditionId && !item.encounterDiagnosisId + ); + if (hasUnsaved) { + proxy.$modal.msgWarning('请保存当前诊断'); + return; + } + if (props.patientInfo.contractName != '自费') { // 获取患者慢性病信息 getChronicDisease({ encounterId: props.patientInfo.encounterId }).then((res) => { @@ -711,6 +726,12 @@ function getTree() { function handleAddDiagnosis() { console.log('点击新增诊断按钮,allowAdd:', allowAdd.value); + // 检查是否已填写病历(必须先于其他检查) + if (!allowAdd.value) { + proxy.$modal.msgWarning('请先填写病历'); + return; + } + // 检查当前列表是否已有未保存的诊断,阻止重复新增 const hasUnsaved = (form.value.diagnosisList || []).some( (item) => !item.conditionId && !item.encounterDiagnosisId @@ -730,20 +751,7 @@ function handleAddDiagnosis() { proxy.$refs.formRef.validate((valid, fields) => { console.log('表单验证结果:', valid, '错误字段:', fields); - if (valid) { - if (!allowAdd.value) { - proxy.$modal.msgWarning('请先填写病历'); - return; - } - addDiagnosisItem(); - } else { - console.warn('表单验证失败:', fields); - // 验证失败时也允许添加(因为是新增空行) - if (allowAdd.value) { - console.log('验证失败但允许添加,强制添加诊断'); - addDiagnosisItem(); - } - } + addDiagnosisItem(); }); } @@ -1094,10 +1102,22 @@ function handleNodeClick(data) { // 如果是根节点,不执行任何操作 return; } - // if (!allowAdd.value) { - // proxy.$modal.msgWarning('请先填写病历'); - // return; - // } + + // 检查是否已填写病历 + if (!allowAdd.value) { + proxy.$modal.msgWarning('请先填写病历'); + return; + } + + // 检查当前列表是否有未保存的诊断,阻止重复新增 + const hasUnsaved = (form.value.diagnosisList || []).some( + (item) => !item.conditionId && !item.encounterDiagnosisId + ); + if (hasUnsaved) { + proxy.$modal.msgWarning('请保存当前诊断'); + return; + } + const isDuplicate = form.value.diagnosisList.some( (diagnosis) => diagnosis.ybNo === data.ybNo || diagnosis.name === data.name ); diff --git a/healthlink-his-ui/src/views/inpatientNurse/medicalOrderProofread/components/prescriptionList.vue b/healthlink-his-ui/src/views/inpatientNurse/medicalOrderProofread/components/prescriptionList.vue index 39a24468f..df814cd11 100755 --- a/healthlink-his-ui/src/views/inpatientNurse/medicalOrderProofread/components/prescriptionList.vue +++ b/healthlink-his-ui/src/views/inpatientNurse/medicalOrderProofread/components/prescriptionList.vue @@ -15,6 +15,7 @@ 全部 @@ -33,9 +34,12 @@ value-format="YYYY-MM-DD HH:mm:ss" style="width: 200px" /> + 查询 +
@@ -47,11 +51,37 @@ v-model="chooseAll" @change="handelSwitchChange" /> - type="primary" - > - - + + + +
- - - - - - - - encounterId: item.encounterId, - patientId: item.patientId, - accountId: item.accountId, - therapyEnum: item.therapyEnum, - exePerformRecordList: item.exePerformRecordList, /** * 执行医嘱 */ @@ -853,3 +828,27 @@ function handleVoid() { } }); } + +defineExpose({ + handleGetPrescription, +}); + + +