update point tier rule

This commit is contained in:
Timi
2026-08-14 18:26:11 +08:00
parent 3b5ff75772
commit a43694daa3
16 changed files with 940 additions and 32 deletions
+10 -2
View File
@@ -36,7 +36,7 @@
<template #left-icon>
<div class="point">
<t-icon name="money" />
<span v-text="`${item.pointValue ? item.pointValue : '?'}`" />
<span v-text="getPointText(item)" />
</div>
</template>
<template #title>
@@ -232,11 +232,19 @@ function getTriggerText(rule: PointRule): string {
EVERY_TIME: "每次登记",
FIRST_TIME: "首次登记",
AFTER_COUNT_EVERY_TIME: `达到 ${rule.conditionJson?.threshold ?? 0} 次后每次登记`,
SOURCE_VALUE: "登记时自定义积分"
SOURCE_VALUE: "登记时自定义积分",
CUSTOMER_EVENT_VALUE_TIER: `按 ${rule.conditionJson?.window?.amount ?? 1} 年累计分档`
};
return map[rule.triggerType || ""] || "未知触发类型";
}
function getPointText(rule: PointRule): string {
if (rule.pointMode === "TIER") {
return "分档";
}
return rule.pointValue === undefined || rule.pointValue === null ? "?" : String(rule.pointValue);
}
function getStatusText(status?: PointRuleStatus): string {
return ({
DRAFT: "草稿",