feat(代理中心): 数据展示字段调整
This commit is contained in:
parent
7708abb5d8
commit
403f3068fc
@ -125,18 +125,6 @@
|
||||
>
|
||||
{{ t('agency') }}
|
||||
</div>
|
||||
<!-- 下划线元素 -->
|
||||
<!-- <div
|
||||
style="
|
||||
width: 15px;
|
||||
height: 3px;
|
||||
background-color: #bb92ff;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
transition: left 0.3s ease;
|
||||
"
|
||||
:style="underlineStyle"
|
||||
></div> -->
|
||||
</div>
|
||||
|
||||
<!-- help -->
|
||||
@ -150,6 +138,7 @@
|
||||
|
||||
<!-- 标签内容 -->
|
||||
<div>
|
||||
<!-- 主播栏 -->
|
||||
<div v-if="taskTab === 'host'">
|
||||
<div
|
||||
style="
|
||||
@ -237,6 +226,7 @@
|
||||
></workReportBox>
|
||||
</div>
|
||||
|
||||
<!-- 代理栏 -->
|
||||
<div v-else>
|
||||
<div
|
||||
style="
|
||||
@ -269,14 +259,12 @@
|
||||
</div>
|
||||
<div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px">
|
||||
<div class="contentText">
|
||||
{{ t('host_salary') }} {{ loadingTeamBill ? '–' : teamBillInfo.hostSalary }}
|
||||
{{ t('host_salary') }} {{ teamBillInfo.hostSalary || '–' }}
|
||||
</div>
|
||||
<div class="contentText">
|
||||
{{ t('agent_salary') }} {{ loadingTeamBill ? '–' : teamBillInfo.agentSalary }}
|
||||
</div>
|
||||
<div class="contentText">
|
||||
{{ t('total') }} {{ loadingTeamBill ? '–' : teamBillInfo.total }}
|
||||
{{ t('agent_salary') }} {{ teamBillInfo.agentSalary || '–' }}
|
||||
</div>
|
||||
<div class="contentText">{{ t('total') }} {{ teamBillInfo.total || '–' }}</div>
|
||||
<div style="display: flex; justify-content: flex-end">
|
||||
<div
|
||||
style="
|
||||
@ -289,7 +277,7 @@
|
||||
:style="{ boxShadow }"
|
||||
>
|
||||
<div style="font-weight: 500" :style="{ color }">
|
||||
{{ loadingTeamBill ? '–' : teamBillInfo.status }}
|
||||
{{ teamBillInfo.status || '–' }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -387,7 +375,7 @@ const underlineStyle = computed(() => {
|
||||
}
|
||||
})
|
||||
|
||||
// 获取成员工作数据
|
||||
// 获取最新成员工作数据和账单数据
|
||||
const fetchMemberWorkData = async () => {
|
||||
try {
|
||||
const userId = getUserId()
|
||||
@ -430,10 +418,19 @@ const fetchMemberWorkData = async () => {
|
||||
date: `${month}.${year}`,
|
||||
status: formatStatus(latestTarget.status),
|
||||
target: level,
|
||||
salary: latestTarget.target?.settlementResult?.ownSalary?.toFixed(2) || '–',
|
||||
salary: latestTarget.target?.settlementResult?.memberSalary?.toFixed(2) || '–',
|
||||
income: latestTarget.target?.settlementResult?.acceptGiftValue,
|
||||
timeDays: latestTarget.target?.effectiveDay || '–',
|
||||
})
|
||||
|
||||
// 更新数据
|
||||
Object.assign(teamBillInfo, {
|
||||
date: `${year}.${month}`,
|
||||
status: formatStatus(latestTarget.status),
|
||||
hostSalary: latestTarget.target?.settlementResult?.memberSalary?.toFixed(2) || '–',
|
||||
agentSalary: latestTarget.target?.settlementResult?.ownSalary?.toFixed(2) || '–',
|
||||
total: latestTarget.target?.settlementResult?.totalSalary?.toFixed(2) || '–',
|
||||
})
|
||||
} else {
|
||||
console.warn('No targets data available')
|
||||
}
|
||||
@ -587,8 +584,8 @@ const { userInfo, salaryInfo, taskInfo, handleImageError, getAvatarPlaceholder }
|
||||
forceRefresh: true, // 强制刷新
|
||||
onDataLoaded: () => {
|
||||
fetchTeamMemberCount()
|
||||
fetchTeamBillData() // 新增:获取团队账单数据
|
||||
fetchMemberWorkData() // 新增:获取成员工作数据
|
||||
// fetchTeamBillData() // 获取团队账单数据
|
||||
fetchMemberWorkData() // 获取最新成员工作数据和账单数据
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user