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