From 253f8921c1fdd0988c80a140f3dfa9d27dc6190b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=B3=E7=BE=BD?= <关羽@gentronhealth.com> Date: Thu, 14 May 2026 16:30:03 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#523:=20[=E4=BD=8F=E9=99=A2?= =?UTF-8?q?=E5=8C=BB=E7=94=9F=E7=AB=99-=E4=B8=B4=E5=BA=8A=E5=8C=BB?= =?UTF-8?q?=E5=98=B1]=20=E5=BE=85=E4=BF=9D=E5=AD=98=E5=8C=BB=E5=98=B1?= =?UTF-8?q?=E6=80=BB=E9=87=91=E9=A2=9D=E6=98=BE=E7=A4=BA=E7=BC=BA=E5=A4=B1?= =?UTF-8?q?=E4=B8=94=E7=BC=96=E8=BE=91=E6=80=81=E5=8D=95=E4=BD=8D=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E6=A1=86=E5=8F=98=E4=B8=BA=E6=95=B0=E5=AD=97=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 总金额列显示横杠: 在 setValue 中为药品类医嘱初始化 totalPrice(有 quantity 时按单价计算,否则为 '0'),确保待保存医嘱的总金额列能正常回显 - 单位选择框变数字控件: setValue 中将 unitCode/doseUnitCode/minUnitCode 统一转为 String 类型,避免 el-select 因值类型不匹配而渲染异常 Co-Authored-By: Claude Opus 4.7 --- .../home/components/order/index.vue | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) 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 23b1e1daf..f7891dc1b 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 @@ -1503,16 +1503,16 @@ function handleSaveBatch() { } function setValue(row) { - // 构造单位列表 + // 构造单位列表,确保 value 始终为 String 类型,避免 el-select 值类型不匹配 unitCodeList.value = [ - { value: row.unitCode, label: row.unitCode_dictText, type: 'unit' }, + { value: String(row.unitCode ?? ''), label: row.unitCode_dictText, type: 'unit' }, { - value: row.doseUnitCode, + value: String(row.doseUnitCode ?? ''), label: row.doseUnitCode_dictText, type: 'dose', }, { - value: row.minUnitCode, + value: String(row.minUnitCode ?? ''), label: row.minUnitCode_dictText, type: 'minUnit', }, @@ -1577,9 +1577,9 @@ function setValue(row) { orgName: row.adviceType != 3 ? undefined : (findOrgName(row.orgId || row.positionId || patientInfo.value?.inHospitalOrgId) || row.orgName || patientInfo.value?.inHospitalOrgName || ''), // dose: undefined, Removed to preserve dose value from group package unitCodeList: unitCodeList.value, - doseUnitCode: row.doseUnitCode, - minUnitCode: row.minUnitCode, - unitCode: row.partAttributeEnum == 1 ? row.minUnitCode : row.unitCode, + doseUnitCode: String(row.doseUnitCode ?? ''), + minUnitCode: String(row.minUnitCode ?? ''), + unitCode: row.partAttributeEnum == 1 ? String(row.minUnitCode ?? '') : String(row.unitCode ?? ''), categoryEnum: row.categoryCode, definitionId: row.chargeItemDefinitionId, executeNum: 1, @@ -1595,6 +1595,10 @@ function setValue(row) { ? new Decimal(selectedStock.price).div(row.partPercent).toFixed(6) : prevRow.minUnitPrice, positionName: selectedStock?.locationName, + // 🔧 Bug #523 修复:初始化 totalPrice 为 0,避免总金额列显示为横杠 + totalPrice: row.quantity + ? new Decimal(row.quantity).mul(selectedStock?.price ?? 0).toFixed(6) + : '0', } : { quantity: 1,