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,