门诊医生站-》开立诊断 页面调整
This commit is contained in:
@@ -197,7 +197,10 @@ watch(
|
||||
|
||||
// 直接更新查询参数
|
||||
queryParams.value.searchKey = newValue.searchKey || '';
|
||||
|
||||
|
||||
// 更新categoryCode
|
||||
queryParams.value.categoryCode = newValue.categoryCode || '';
|
||||
|
||||
// 处理类型筛选
|
||||
if (newValue.adviceType !== undefined && newValue.adviceType !== null && newValue.adviceType !== '') {
|
||||
// 单个类型
|
||||
@@ -215,8 +218,18 @@ getList();
|
||||
// 从priceList列表中获取价格
|
||||
function getPriceFromInventory(row) {
|
||||
if (row.priceList && row.priceList.length > 0) {
|
||||
const price = row.priceList[0].price || 0;
|
||||
return Number(price).toFixed(2) + ' 元';
|
||||
const price = row.priceList[0].price;
|
||||
// 检查价格是否为有效数字
|
||||
if (price !== undefined && price !== null && !isNaN(price) && isFinite(price)) {
|
||||
return Number(price).toFixed(2) + ' 元';
|
||||
}
|
||||
// 如果价格无效,尝试从其他可能的字段获取价格
|
||||
if (row.totalPrice !== undefined && row.totalPrice !== null && !isNaN(row.totalPrice) && isFinite(row.totalPrice)) {
|
||||
return Number(row.totalPrice).toFixed(2) + ' 元';
|
||||
}
|
||||
if (row.price !== undefined && row.price !== null && !isNaN(row.price) && isFinite(row.price)) {
|
||||
return Number(row.price).toFixed(2) + ' 元';
|
||||
}
|
||||
}
|
||||
return '-';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user