From 403f3068fccb84559d979cd918d2f415d81af351 Mon Sep 17 00:00:00 2001 From: hzj <1304805162@qq.com> Date: Mon, 10 Nov 2025 17:40:31 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E4=BB=A3=E7=90=86=E4=B8=AD=E5=BF=83):=20?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=B1=95=E7=A4=BA=E5=AD=97=E6=AE=B5=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/AgencyCenterView.vue | 41 ++++++++++++++++------------------ 1 file changed, 19 insertions(+), 22 deletions(-) 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() // 获取最新成员工作数据和账单数据 }, })