98 门诊管理-》门诊划价:选项增加‘西药’和‘中成药’

This commit is contained in:
Ranyunqiao
2026-04-01 13:14:46 +08:00
parent 1ab9b020c1
commit 9105e687d6
22 changed files with 418 additions and 144 deletions

View File

@@ -957,6 +957,32 @@ const { method_code, unit_code, rate_code, distribution_category_code, drord_doc
'drord_doctor_type'
);
// 格式化价格显示
function formatPrice(price, suffix = ' 元', defaultValue = '-') {
if (price !== undefined && price !== null && !isNaN(price) && isFinite(price)) {
return Number(price).toFixed(2) + suffix;
}
return defaultValue;
}
// 格式化价格(用于编辑状态,不带单位)
function formatPriceEdit(price) {
if (price !== undefined && price !== null && !isNaN(price) && isFinite(price)) {
return Number(price).toFixed(2);
}
return '0.00';
}
// 格式化剂量显示
function formatDose(dose, unitText) {
return dose ? dose + ' ' + (unitText || '') : '';
}
// 格式化数量显示
function formatQuantity(quantity, unitText) {
return quantity ? quantity + ' ' + (unitText || '') : '';
}
// 删除硬编码的adviceTypeList直接使用drord_doctor_type字典
// drord_doctor_type: 1=西药, 2=中成药, 3=诊疗, 4=耗材, 5=会诊, 6=全部
const adviceTypeList = ref([