Commit d90e75c9 by 李伟康

feat(sales): 在兜底条件组件中显示兜底标准数值

- 在界面显示中添加兜底标准数值展示功能
- 新增 guaranteeStandard 方法用于获取兜底标准值
- 添加百分号单位自动转换逻辑
- 修复兜底标准数值缺失的显示问题
1 parent 31edbdbc
......@@ -11,7 +11,7 @@
<div class="block" :key="index">
<div class="item">
<div class="item-label">兜底标准:</div>
<div class="item-value">{{ metricName(item) }}</div>
<div class="item-value">{{ metricName(item) }}{{guaranteeStandard(item)}}</div>
</div>
<div class="item">
<div class="item-label">赔付标准:</div>
......@@ -168,6 +168,15 @@ export default {
this.$message.error(error)
}
},
guaranteeStandard(item){
let { metricConfigs } = this
if (metricConfigs && metricConfigs.length && item.guaranteeIndex){
let type = metricConfigs.find(e => e.metricCode == item.guaranteeIndex)?.dataType,
unit = ''
if(type == 1) unit = '%'
return `${item.guaranteeStandard}${unit}`
} else return ''
},
metricName(item) {
let { metricConfigs } = this
if (metricConfigs && metricConfigs.length) return metricConfigs.find(e => e.metricCode == item.guaranteeIndex)?.metricName || '-'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!