添加注释
This commit is contained in:
1 parent
4f46b23769
commit
d52765604e
4 files changed
+164
No files matched your search
@@ -614,6 +614,8 @@ const resolveScaleRows = (
|
||||
return buildDefaultScaleRows(serviceId, consultCategoryFactorMap, majorFactorMap)
|
||||
}
|
||||
|
||||
// 统一生成某合同下某个咨询服务四种计费方式的存储键。
|
||||
// 优先复用 Pinia store 当前约定的 key,避免与旧版 fallback key 脱节。
|
||||
export const getPricingMethodDetailDbKeys = (
|
||||
contractId: string,
|
||||
serviceId: string | number
|
||||
@@ -697,6 +699,8 @@ const buildDefaultPricingMethodDetailRows = (
|
||||
}
|
||||
}
|
||||
|
||||
// 强制为一组服务重建并落库默认明细行。
|
||||
// 这个方法会同时写入 Pinia 内存态和底层 KV 存储,适合“重置为默认值”场景。
|
||||
export const persistDefaultPricingMethodDetailRowsForServices = async (params: {
|
||||
contractId: string
|
||||
serviceIds: Array<string | number>
|
||||
@@ -729,6 +733,8 @@ export const persistDefaultPricingMethodDetailRowsForServices = async (params: {
|
||||
)
|
||||
}
|
||||
|
||||
// 汇总单个服务的四类计费方式金额。
|
||||
// 数据读取顺序是:优先读当前 Pinia 中已加载的计费页数据,缺失时再回退到 KV 存储和合同段默认信息。
|
||||
export const getPricingMethodTotalsForService = async (params: {
|
||||
contractId: string
|
||||
serviceId: string | number
|
||||
@@ -830,6 +836,8 @@ export const getPricingMethodTotalsForService = async (params: {
|
||||
}
|
||||
}
|
||||
|
||||
// 为一组服务补齐缺失的计费明细行,但不会覆盖已有用户数据。
|
||||
// 适合在首次进入计费页或新增服务后做“按需初始化”。
|
||||
export const ensurePricingMethodDetailRowsForServices = async (params: {
|
||||
contractId: string
|
||||
serviceIds: Array<string | number>
|
||||
@@ -918,6 +926,7 @@ export const ensurePricingMethodDetailRowsForServices = async (params: {
|
||||
)
|
||||
}
|
||||
|
||||
// 并行汇总多个服务的计费结果,返回以 serviceId 为 key 的 Map。
|
||||
export const getPricingMethodTotalsForServices = async (params: {
|
||||
contractId: string
|
||||
serviceIds: Array<string | number>
|
||||
|
||||
Reference in new issue
Block a user