From 1fbed5c5955b00d6dae8b793dc7a925b2ec1e30b Mon Sep 17 00:00:00 2001 From: guanyu Date: Mon, 18 May 2026 09:09:42 +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=E4=BF=AE=E5=A4=8D=E5=BE=85=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E5=8C=BB=E5=98=B1=E6=80=BB=E9=87=91=E9=A2=9D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=BC=BA=E5=A4=B1=E5=8F=8A=E7=BC=96=E8=BE=91=E6=80=81=E5=8D=95?= =?UTF-8?q?=E4=BD=8D=E9=80=89=E6=8B=A9=E6=A1=86=E7=B1=BB=E5=9E=8B=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:setValue() 中药品分支未初始化 totalPrice;unitCode/minUnitCode 未转 String 导致 el-select 类型不匹配 修复:选药后立即计算 totalPrice;所有单位值统一 String() 转换 Co-Authored-By: Claude Opus 4.7 --- .../home/components/order/index.vue | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 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 e74fd628d..61c8c958f 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 @@ -1441,14 +1441,14 @@ function handleSaveBatch() { function setValue(row) { // 构造单位列表 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', }, @@ -1514,8 +1514,8 @@ function setValue(row) { // 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, + minUnitCode: String(row.minUnitCode), + unitCode: row.partAttributeEnum == 1 ? String(row.minUnitCode) : String(row.unitCode), categoryEnum: row.categoryCode, definitionId: row.chargeItemDefinitionId, executeNum: 1, @@ -1531,6 +1531,13 @@ function setValue(row) { ? new Decimal(selectedStock.price).div(row.partPercent).toFixed(6) : prevRow.minUnitPrice, positionName: selectedStock?.locationName, + totalPrice: row.quantity + ? (String(row.unitCode) == String(row.minUnitCode) + ? (row.quantity * (selectedStock + ? new Decimal(selectedStock.price).div(row.partPercent).toFixed(6) + : prevRow.minUnitPrice)).toFixed(6) + : (row.quantity * (selectedStock?.price ?? 0)).toFixed(6)) + : undefined, } : { quantity: 1,