Fix Bug #464: [目录管理-诊疗目录] 新增项目时"零售价"未与"诊疗子项"合计总价自动同步

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
赵云
2026-05-09 22:19:03 +08:00
parent 2188a32fc6
commit e7a7bd1eda

View File

@@ -474,6 +474,10 @@ function calculateTotalPrice() {
} }
}); });
totalPrice.value = sum.toFixed(2); totalPrice.value = sum.toFixed(2);
// Bug #464: 零售价与诊疗子项合计总价实时同步
if (treatmentItems.value.length > 0 && treatmentItems.value[0].adviceDefinitionId !== '') {
form.value.retailPrice = parseFloat(totalPrice.value);
}
} catch (error) { } catch (error) {
totalPrice.value = '0.00'; totalPrice.value = '0.00';
proxy.$modal.msgWarning('价格计算过程中遇到错误,请检查输入数据'); proxy.$modal.msgWarning('价格计算过程中遇到错误,请检查输入数据');