From 20ab9f890f0a589e5059b3b0d805b63eda326b33 Mon Sep 17 00:00:00 2001 From: xiaoming <13564692840@163.com> Date: Wed, 25 Feb 2026 10:29:15 +0800 Subject: [PATCH] =?UTF-8?q?bug142=20=E5=BA=93=E6=88=BF=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E3=80=8B=E7=BB=9F=E8=AE=A1=E7=AE=A1=E7=90=86-=E3=80=8B?= =?UTF-8?q?=E5=BA=93=E5=AD=98=E6=98=8E=E7=BB=86=E8=AE=B0=E5=BD=95-?= =?UTF-8?q?=E3=80=8B=E5=BA=93=E5=AD=98=E6=98=8E=E7=BB=86=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=A9=BA=E7=99=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../statisticalManagement/index.vue | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/openhis-ui-vue3/src/views/medicationmanagement/statisticalManagement/index.vue b/openhis-ui-vue3/src/views/medicationmanagement/statisticalManagement/index.vue index 77f2bf8e..3495a9fb 100644 --- a/openhis-ui-vue3/src/views/medicationmanagement/statisticalManagement/index.vue +++ b/openhis-ui-vue3/src/views/medicationmanagement/statisticalManagement/index.vue @@ -277,7 +277,7 @@ :show-overflow-tooltip="true" > { - salePriceTotal.value = res.data.purchasePriceStatistics; - priceTotal.value = res.data.salePriceStatistics; + // 使用 Number() 强制转换,解决字符串问题 + // 使用 || 0 解决 null/undefined 问题 + const purchasePrice = res.data?.purchasePriceStatistics; + const salePrice = res.data?.salePriceStatistics; + + salePriceTotal.value = Number(purchasePrice || 0); + priceTotal.value = Number(salePrice || 0); }); }