From 3310a1de9e05fe44e77e8b22eb3a238bdfcf4734 Mon Sep 17 00:00:00 2001 From: zhaoyun Date: Wed, 20 May 2026 12:06:26 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#559:=20=E7=BB=84=E5=A5=97=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=8C=BB=E5=98=B1=E5=90=8E=E6=96=B0=E5=A2=9E=E5=8C=BB?= =?UTF-8?q?=E5=98=B1=E7=BD=AE=E9=A1=B6=20=E2=80=94=20=E6=A0=B9=E5=9B=A0?= =?UTF-8?q?=EF=BC=9AhandleSaveGroup=20=E5=8F=AA=E5=81=9A=E4=BA=86=20unshif?= =?UTF-8?q?t=20=E4=BD=86=E6=9C=AA=E6=98=BE=E5=BC=8F=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=EF=BC=8C=E5=AF=BC=E8=87=B4=E5=B7=B2=E6=9C=89=20requestTime=20?= =?UTF-8?q?=E7=9A=84=E6=97=A7=E6=95=B0=E6=8D=AE=E4=B8=8E=E6=97=A0=20reques?= =?UTF-8?q?tTime=20=E7=9A=84=E6=96=B0=E6=95=B0=E6=8D=AE=E6=B7=B7=E6=8E=92?= =?UTF-8?q?=E6=97=B6=E9=A1=BA=E5=BA=8F=E4=B8=8D=E7=A8=B3=E5=AE=9A=EF=BC=9B?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9Aunshift=20=E5=90=8E=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=8C=89=20requestTime=20=E9=99=8D=E5=BA=8F=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=EF=BC=8C=E7=A1=AE=E4=BF=9D=E6=97=A0=20requestTime=20?= =?UTF-8?q?=E7=9A=84=E6=96=B0=E5=A2=9E=E7=BB=84=E5=A5=97=E5=8C=BB=E5=98=B1?= =?UTF-8?q?=E5=A7=8B=E7=BB=88=E6=98=BE=E7=A4=BA=E5=9C=A8=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=9C=80=E4=B8=8A=E6=96=B9=20Co-Authored-By:=20Claude=20Opus?= =?UTF-8?q?=204.6=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/inpatientDoctor/home/components/order/index.vue | 7 +++++++ 1 file changed, 7 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 48107699..391036a6 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 @@ -1671,6 +1671,13 @@ function handleSaveGroup(orderGroupList) { if (newRows.length > 0) { prescriptionList.value.splice(originalLength); // 移除循环中追加到末尾的临时行 prescriptionList.value.unshift(...newRows); + // 排序:确保没有 requestTime 的新行始终排在最前面 + prescriptionList.value.sort((a, b) => { + if (!a.requestTime && !b.requestTime) return 0; + if (!a.requestTime) return -1; + if (!b.requestTime) return 1; + return new Date(b.requestTime) - new Date(a.requestTime); + }); proxy.$modal.msgSuccess(`成功添加 ${successCount} 个医嘱项`); } }