diff --git a/src/views/AgencyCenterView.vue b/src/views/AgencyCenterView.vue index f92ccb2..1600f67 100644 --- a/src/views/AgencyCenterView.vue +++ b/src/views/AgencyCenterView.vue @@ -125,18 +125,6 @@ > {{ t('agency') }} - - @@ -150,6 +138,7 @@
+
- {{ t('host_salary') }} {{ loadingTeamBill ? '–' : teamBillInfo.hostSalary }} + {{ t('host_salary') }} {{ teamBillInfo.hostSalary || '–' }}
- {{ t('agent_salary') }} {{ loadingTeamBill ? '–' : teamBillInfo.agentSalary }} -
-
- {{ t('total') }} {{ loadingTeamBill ? '–' : teamBillInfo.total }} + {{ t('agent_salary') }} {{ teamBillInfo.agentSalary || '–' }}
+
{{ t('total') }} {{ teamBillInfo.total || '–' }}
- {{ loadingTeamBill ? '–' : teamBillInfo.status }} + {{ teamBillInfo.status || '–' }}
@@ -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() // 获取最新成员工作数据和账单数据 }, })