history salary 修复
This commit is contained in:
parent
8cd5eb6d26
commit
e54a2e294c
@ -301,7 +301,13 @@ const fetchWorkReports = async (userId) => {
|
||||
date: target.billTitle,
|
||||
status: getStatusText(target.status),
|
||||
target: getLevelFromPolicy(target.target?.acceptGiftValue), // 使用政策数据计算等级
|
||||
salary: formatSalaryValue(target.target?.settlementResult?.[userIdentity.body?.agent ? 'ownSalary' : userIdentity.body?.anchor ? 'memberSalary' : null]) || '-',
|
||||
salary: formatSalaryValue(
|
||||
userIdentity.body?.agent
|
||||
? (target.target?.settlementResult?.ownSalary || 0) + (target.target?.settlementResult?.memberSalary || 0)
|
||||
: userIdentity.body?.anchor
|
||||
? target.target?.settlementResult?.memberSalary
|
||||
: null
|
||||
) || '-',
|
||||
totalSalary: formatSalaryValue(target.target?.settlementResult?.totalSalary) || '-',
|
||||
timeDays: target.target?.effectiveDay || '-',
|
||||
hasDetails: target.target && target.target.dailyTargets && target.target.dailyTargets.length > 0,
|
||||
@ -315,7 +321,7 @@ const fetchWorkReports = async (userId) => {
|
||||
// 根据用户身份决定使用哪个薪资字段
|
||||
if (userIdentity.body?.agent) {
|
||||
// agent 为 true 时,使用 ownSalary
|
||||
salary = parseFloat(target.target?.settlementResult?.ownSalary || 0)
|
||||
salary = parseFloat((target.target?.settlementResult?.ownSalary || 0) + (target.target?.settlementResult?.memberSalary || 0))
|
||||
} else if (userIdentity.body?.anchor) {
|
||||
// anchor 为 true 时,使用 memberSalary
|
||||
salary = parseFloat(target.target?.settlementResult?.memberSalary || 0)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user