From c012974fd0c5dbc5eeebeb4a4c4e7a7a5c28f84a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=B3=E7=BE=BD?= <关羽@gentronhealth.com> Date: Wed, 13 May 2026 14:26:51 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#405:=20=E4=BD=8F=E9=99=A2=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E5=B7=A5=E4=BD=9C=E7=AB=99=EF=BC=9A=E4=B8=B4=E5=BA=8A?= =?UTF-8?q?=E5=8C=BB=E5=98=B1=E4=BF=9D=E5=AD=98=E6=88=90=E5=8A=9F=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E5=8C=BB=E5=98=B1=E6=9D=A1=E7=9B=AE=E4=BB=8D=E5=A4=84?= =?UTF-8?q?=E4=BA=8E=E5=8F=AF=E7=BC=96=E8=BE=91=E7=8A=B6=E6=80=81=EF=BC=88?= =?UTF-8?q?=E6=9C=AA=E9=94=81=E5=AE=9A=E5=B1=95=E7=A4=BA=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - getListInfo: 增加 getPrescriptionList 的 .catch() 处理,API失败时锁定所有行(isEdit=false) 防止列表加载静默失败导致医嘱永久处于可编辑状态 - handleSaveBatch: 在 .catch() 中增加 isEdit=false 重置,保存失败时也锁定行 - 与之前的修复配合:保存成功时先设置 isEdit=false 再调用 getListInfo 刷新数据 Co-Authored-By: Claude Opus 4.7 --- .../inpatientDoctor/home/components/order/index.vue | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 ef47a8e7..58495e87 100755 --- a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/index.vue +++ b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/index.vue @@ -631,6 +631,12 @@ function getListInfo(addNewRow) { handleAddPrescription(); } }); + }).catch((err) => { + console.error('处方列表加载失败:', err); + // 🔧 Bug #405 修复:列表加载失败时,确保所有行被锁定(isEdit=false) + // 防止行永久处于可编辑状态 + prescriptionList.value.forEach(item => { item.isEdit = false; }); + loadingInstance.close(); }); getContract({ encounterId: patientInfo.value.encounterId }).then((res) => { contractList.value = res.data; @@ -1443,6 +1449,12 @@ function handleSaveBatch() { }) .catch((error) => { isSaving.value = false; + // 🔧 Bug #405 修复:保存失败时也锁定行,防止行永久处于可编辑状态 + filterPrescriptionList.value.forEach(item => { + if (item.statusEnum == 1 && !item.requestId) { + item.isEdit = false; + } + }); proxy.$modal.msgError(error?.msg || '保存失败,请重试'); }); }