fix(medical): 修复医嘱剂量计算和数据同步问题

- 修正剂量转换公式,将乘法改为除法以正确计算
- 修复剂量数量字段的计算逻辑错误
- 添加字典文本字段回显支持
- 实现医嘱组套字段同步功能
- 保留组套中的原始值而不是强制重置
- 修复设备名称映射字段错误
This commit is contained in:
2026-03-19 10:25:34 +08:00
parent 0c06b05764
commit 3bfe25c2f2
4 changed files with 111 additions and 27 deletions

View File

@@ -222,26 +222,26 @@
<template #default="scope">
<template v-if="scope.row.adviceType == 1">
<template v-if="!scope.row.groupPackageId">
<el-input
style="width: 70px; margin-right: 10px"
v-model="scope.row.doseQuantity"
@input="
(value) => {
scope.row.dose = value * scope.row.unitConversionRatio;
}
"
/>
<span>{{ scope.row.minUnitCode_dictText }}</span>
<span>{{ ' = ' }}</span>
<el-input
style="width: 70px; margin-right: 10px"
v-model="scope.row.dose"
@input="
(value) => {
scope.row.doseQuantity = value / scope.row.unitConversionRatio;
}
"
/>
<el-input
style="width: 70px; margin-right: 10px"
v-model="scope.row.doseQuantity"
@input="
(value) => {
scope.row.dose = value / scope.row.unitConversionRatio;
}
"
/>
<span>{{ scope.row.minUnitCode_dictText }}</span>
<span>{{ ' = ' }}</span>
<el-input
style="width: 70px; margin-right: 10px"
v-model="scope.row.dose"
@input="
(value) => {
scope.row.doseQuantity = value * scope.row.unitConversionRatio;
}
"
/>
<span>{{ scope.row.doseUnitCode_dictText }}</span>
</template>
<span v-else>{{ scope.row.dose }}</span>
@@ -586,6 +586,17 @@ function handleEdit(tab, row) {
selectUnitCode: item.unitCode,
adviceName: item.orderDefinitionName,
unitCodeName: item.unitCodeName,
// 回显单次剂量/给药途径/用药频次/天数等字段
dispensePerDuration: item.dispensePerDuration,
dose: item.dose,
doseQuantity: item.doseQuantity,
methodCode: item.methodCode,
methodCode_dictText: item.methodCode_dictText,
rateCode: item.rateCode,
rateCode_dictText: item.rateCode_dictText,
groupId: item.groupId,
groupOrder: item.groupOrder,
therapyEnum: item.therapyEnum != null ? String(item.therapyEnum) : '1',
};
});
prescriptionList.value.unshift({