607 【门诊术中安排-医嘱】医师电子签名核验异常(签名医师显示账号名而非姓名、签名时间缺失)
606 门诊术中安排-医嘱】预览列表字段显示及逻辑异常(涉及单位、频次、执行时间) 605 【门诊手术安排-计费】新增计费项目保存后,明细列表的“总量”列单位错误显示为字典ID数字(如“瓶”显示为“8” 604 【门诊手术安排-医嘱】编辑临时医嘱保存后,需额外二次操作方能提交,与实际业务符合,交互体验不佳
This commit is contained in:
@@ -375,7 +375,7 @@
|
||||
>
|
||||
<template #default="scope">
|
||||
<span v-if="!scope.row.isEdit">
|
||||
{{ scope.row.quantity ? scope.row.quantity + ' ' + scope.row.unitCode_dictText : '' }}
|
||||
{{ formatUnitText(scope.row) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -613,6 +613,26 @@ function getRowDisabled(row) {
|
||||
return row.isEdit;
|
||||
}
|
||||
|
||||
function formatUnitText(row) {
|
||||
if (!row.quantity) return ''
|
||||
const unitText = row.unitCode_dictText
|
||||
// unitCode_dictText 为有效文本时直接使用
|
||||
if (unitText && !/^\d+$/.test(unitText)) return row.quantity + ' ' + unitText
|
||||
// 优先从行级 unitCodeList 查找
|
||||
const list = row.unitCodeList
|
||||
if (list && list.length) {
|
||||
const match = list.find(u => u.value === row.unitCode)
|
||||
if (match) return row.quantity + ' ' + match.label
|
||||
}
|
||||
// 回退:从字典 unit_code 查找
|
||||
if (unit_code.value && unit_code.value.length) {
|
||||
const dictMatch = unit_code.value.find(d => d.value === row.unitCode)
|
||||
if (dictMatch) return row.quantity + ' ' + dictMatch.label
|
||||
}
|
||||
// 最后兜底用 unitCode
|
||||
return row.quantity + ' ' + (row.unitCode || '')
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否已由医生接诊(非待诊)
|
||||
* EncounterStatus: 1=待诊 2=在诊 3=暂离 …
|
||||
|
||||
Reference in New Issue
Block a user