feat(对接接口): BD中心页和BDLeader中心页
This commit is contained in:
parent
6674120f1b
commit
5a166dc140
@ -70,7 +70,7 @@
|
||||
ID: {{ userInfo.id || userInfo.account }}
|
||||
</p>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center">
|
||||
<div style="display: flex; align-items: center" @click="gotoPolicy">
|
||||
<img src="../assets/icon/info.png" alt="" style="display: block; width: 20px" />
|
||||
</div>
|
||||
</div>
|
||||
@ -262,55 +262,50 @@
|
||||
<div style="overflow-y: auto" class="salaryList">
|
||||
<!-- 薪资列表 -->
|
||||
<div style="display: flex; flex-direction: column; gap: 8px">
|
||||
<!-- <historySalary type="In Progress">
|
||||
<template v-slot:content>
|
||||
<div>2025.10.16-2025.10.31:</div>
|
||||
<div style="display: grid; grid-template-columns: repeat(2, 1fr)">
|
||||
<div>Number of BDs: 5</div>
|
||||
<div>Team Salary: $400</div>
|
||||
</div>
|
||||
</template>
|
||||
</historySalary> -->
|
||||
<historySalary
|
||||
v-for="income in BDSalary.incomeDetails"
|
||||
type="In Progress"
|
||||
:type="income.statusText"
|
||||
long="true"
|
||||
@showMore="showReportDetail()"
|
||||
@showMore="showReportDetail(income.billBelong)"
|
||||
>
|
||||
<template v-if="income.statusText == 'In Progress'" v-slot:content>
|
||||
<div>{{ income.billTitle }}:</div>
|
||||
<div>{{ income.billTitle }}</div>
|
||||
<div style="font-size: 0.9em">Number of teams: {{ income.agencyNumber }}</div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="font-size: 0.9em">Team salary: ${{ income.teamSalaryAmount }}</div>
|
||||
<div style="font-size: 0.9em">BD income (salary): $12 (3%)</div>
|
||||
<div style="font-size: 0.9em">
|
||||
BD income (salary): ${{ income.bdIncomeSalary || 0 }} ({{
|
||||
income.bdRatioSalary || 0
|
||||
}}%)
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="font-size: 0.9em">
|
||||
Team top-up: ${{ income.teamRechargeAmount }}
|
||||
</div>
|
||||
<div style="font-size: 0.9em">BD income (top-up): $12 (3%)</div>
|
||||
<div style="font-size: 0.9em">
|
||||
BD income (top-up): ${{ income.bdIncomeRecharge || 0 }} ({{
|
||||
income.bdRatioRecharge || 0
|
||||
}}%)
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-else v-slot:content>
|
||||
<div>2025.10.16-2025.10.31:</div>
|
||||
<div style="font-size: 0.9em">Number Of Teams: 5</div>
|
||||
<div>{{ income.billTitle }}</div>
|
||||
<div style="font-size: 0.9em">Number Of Teams: {{ income.agencyNumber }}</div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="font-size: 0.9em">Number Of Teams: 5</div>
|
||||
<div style="font-size: 0.9em">BD income (salary): $60 (6%)</div>
|
||||
<div style="font-size: 0.9em">
|
||||
Team top-up: ${{ income.teamRechargeAmount }}
|
||||
</div>
|
||||
<div style="font-size: 0.9em">
|
||||
BD income (top-up): ${{ income.bdIncomeRecharge || 0 }} ({{
|
||||
income.bdRatioRecharge || 0
|
||||
}}%)
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</historySalary>
|
||||
<!-- <historySalary type="Completed" v-for="value in 5" @showMore="showReportDetail()">
|
||||
<template v-slot:content>
|
||||
<div>2025.10.16-2025.10.31:</div>
|
||||
<div style="font-size: 0.9em">Number Of Teams: 5</div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="font-size: 0.9em">Number Of Teams: 5</div>
|
||||
<div style="font-size: 0.9em">BD income (salary): $60 (6%)</div>
|
||||
</div>
|
||||
</template>
|
||||
</historySalary> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -330,12 +325,14 @@
|
||||
"
|
||||
@click.stop
|
||||
>
|
||||
<div style="font-weight: 600">2025.10.01-2025.10.15:</div>
|
||||
<div style="font-weight: 600">{{ BDSalaryMore.period }}</div>
|
||||
<div style="font-size: 0.7em; font-weight: 600">
|
||||
Team total recharge: $400 Team total salary: $400
|
||||
Team total recharge: ${{ BDSalaryMore.teamTotalRecharge }}, Team total salary: ${{
|
||||
BDSalaryMore.teamTotalSalary
|
||||
}}
|
||||
</div>
|
||||
<div
|
||||
v-for="value in 3"
|
||||
v-for="member in BDSalaryMore.memberDetails"
|
||||
style="
|
||||
background-color: white;
|
||||
padding: 16px;
|
||||
@ -359,7 +356,7 @@
|
||||
"
|
||||
>
|
||||
<img
|
||||
:src="''"
|
||||
:src="member.userAvatar"
|
||||
alt=""
|
||||
style="
|
||||
display: block;
|
||||
@ -381,10 +378,10 @@
|
||||
white-space: nowrap;
|
||||
"
|
||||
>
|
||||
aaaaa
|
||||
{{ member.userName }}
|
||||
</div>
|
||||
<div style="color: rgba(0, 0, 0, 0.4); font-size: 0.8em; font-weight: 500">
|
||||
ID: 321654
|
||||
ID: {{ member.account }}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@ -395,9 +392,9 @@
|
||||
justify-content: space-around;
|
||||
"
|
||||
>
|
||||
<div style="font-size: 0.8em; font-weight: 500">Salary: $100</div>
|
||||
<div style="font-size: 0.8em; font-weight: 500">Recharge: $500</div>
|
||||
<div style="font-size: 0.8em; font-weight: 500">Host:8</div>
|
||||
<div style="font-size: 0.8em; font-weight: 500">Salary: ${{ member.salary }}</div>
|
||||
<div style="font-size: 0.8em; font-weight: 500">Recharge: ${{ member.recharge }}</div>
|
||||
<div style="font-size: 0.8em; font-weight: 500">Host:{{ member.hostCount }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -411,7 +408,7 @@ import { computed, onMounted, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import MobileHeader from '@/components/MobileHeader.vue'
|
||||
import { getAgentMonthLastTarget, getAgentMonthTarget, getBdAgentList } from '@/api/teamBill.js'
|
||||
import { getBdMemberBillList, getBdHistory } from '@/api/bdCenter.js'
|
||||
import { getBdMemberBillList, getBdHistory, getBdHistoryMore } from '@/api/bdCenter.js'
|
||||
import { getTeamId } from '@/utils/userStore.js'
|
||||
import { usePageInitializationWithConfig } from '@/utils/pageConfig.js'
|
||||
import { isInApp } from '@/utils/appBridge.js'
|
||||
@ -425,7 +422,9 @@ const router = useRouter()
|
||||
const teamMemberCount = ref(0)
|
||||
const showHistory = ref(false) //历史弹窗
|
||||
const showMore = ref(false) //更多弹窗
|
||||
|
||||
const BDSalary = ref({}) //BD历史收入
|
||||
const BDSalaryMore = ref({}) //BD历史收入更多
|
||||
const BDData = ref({}) //BD成员数据
|
||||
|
||||
const defaultAvatarUrl = (e) => {
|
||||
@ -438,22 +437,17 @@ const maskLayerShow = computed(() => {
|
||||
return showHistory.value || showMore.value
|
||||
})
|
||||
|
||||
const showReportDetail = () => {
|
||||
showHistory.value = false
|
||||
showMore.value = true
|
||||
}
|
||||
|
||||
// 关闭弹窗
|
||||
const closedPopup = () => {
|
||||
showHistory.value = false
|
||||
showMore.value = false
|
||||
}
|
||||
|
||||
// 前往团队成员
|
||||
const goToTeamMember = () => {
|
||||
// 前往政策页
|
||||
const gotoPolicy = () => {
|
||||
router.push({
|
||||
path: '/team-member',
|
||||
query: { source: 'bd-center', members: teamMemberCount.value },
|
||||
path: '/policy',
|
||||
query: { from: 'BD' },
|
||||
})
|
||||
}
|
||||
|
||||
@ -502,13 +496,24 @@ const apiGetBdHistory = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 查询BD历史记录
|
||||
const showReportDetail = async (billBelong) => {
|
||||
const res = await getBdHistoryMore(billBelong)
|
||||
if (res.status && res.body) {
|
||||
// 处理返回的数据
|
||||
console.log('BD History More:', res.body)
|
||||
BDSalaryMore.value = res.body || {}
|
||||
|
||||
showHistory.value = false
|
||||
showMore.value = true
|
||||
}
|
||||
}
|
||||
|
||||
// 页面初始化数据
|
||||
const initData = async () => {
|
||||
// 示例调用方式
|
||||
apiGetBdMemberBillList() //BD成员账单列表
|
||||
apiGetBdHistory() //BD历史记录
|
||||
// apiGetBdMemberBillDetailList(456)
|
||||
// apiGetBdMonthlyIncome(789)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
@ -524,7 +529,12 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.bd-center {
|
||||
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
|
||||
max-height: 100vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.bd-center::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* APP连接状态 */
|
||||
|
||||
@ -66,7 +66,7 @@
|
||||
ID: {{ userInfo.id || userInfo.account || '1234567890' }}
|
||||
</p>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center">
|
||||
<div style="display: flex; align-items: center" @click="gotoPolicy">
|
||||
<img src="../../assets/icon/info.png" alt="" style="display: block; width: 20px" />
|
||||
</div>
|
||||
</div>
|
||||
@ -87,6 +87,7 @@
|
||||
|
||||
<!-- 邀请按钮 -->
|
||||
<div style="display: flex; flex-direction: column; gap: 8px">
|
||||
<!-- 邀请成为Agency -->
|
||||
<div
|
||||
style="
|
||||
background-color: white;
|
||||
@ -105,6 +106,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 邀请成为BD -->
|
||||
<div
|
||||
style="
|
||||
background-color: white;
|
||||
@ -171,7 +173,7 @@
|
||||
<!-- BD 标签内容 -->
|
||||
<div v-if="activeTab === 1">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<div style="font-weight: 600">2025.10.01-2025.10.15:</div>
|
||||
<div style="font-weight: 600">{{ BDData.billTitle }}</div>
|
||||
<img
|
||||
src="../../assets/icon/records.png"
|
||||
alt=""
|
||||
@ -180,14 +182,15 @@
|
||||
/>
|
||||
</div>
|
||||
<div style="font-size: 0.8em; font-weight: 600; margin-bottom: 12px">
|
||||
Team total recharge: $400 Team total salary: $400
|
||||
Team total recharge: ${{ BDData.totalRecharge }}, Team total salary: ${{
|
||||
BDData.totalSalary
|
||||
}}
|
||||
</div>
|
||||
|
||||
<!-- 成员列表 -->
|
||||
<div style="display: flex; flex-direction: column; gap: 12px">
|
||||
<div
|
||||
v-for="member in bdMembers"
|
||||
:key="member.id"
|
||||
v-for="BDInfo in BDData.memberBillList"
|
||||
style="
|
||||
background-color: white;
|
||||
padding: 16px;
|
||||
@ -209,7 +212,7 @@
|
||||
"
|
||||
>
|
||||
<img
|
||||
:src="member.avatar"
|
||||
:src="BDInfo.agentAvatar || ''"
|
||||
alt=""
|
||||
style="
|
||||
display: block;
|
||||
@ -231,10 +234,10 @@
|
||||
white-space: nowrap;
|
||||
"
|
||||
>
|
||||
{{ member.name }}
|
||||
{{ BDInfo.agentName }}
|
||||
</div>
|
||||
<div style="color: rgba(0, 0, 0, 0.4); font-size: 0.8em; font-weight: 500">
|
||||
ID: {{ member.id }}
|
||||
ID: {{ BDInfo.agentAccount }}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@ -245,20 +248,24 @@
|
||||
justify-content: space-around;
|
||||
"
|
||||
>
|
||||
<div style="font-size: 0.8em; font-weight: 500">Salary: ${{ member.salary }}</div>
|
||||
<div style="font-size: 0.8em; font-weight: 500">
|
||||
Recharge: ${{ member.recharge }}
|
||||
Salary: ${{ BDInfo.teamSalaryAmount }}
|
||||
</div>
|
||||
<div style="font-size: 0.8em; font-weight: 500">
|
||||
Recharge: ${{ BDInfo.teamRechargeAmount }}
|
||||
</div>
|
||||
<div style="font-size: 0.8em; font-weight: 500">
|
||||
Host:{{ BDInfo.teamMemberCount }}
|
||||
</div>
|
||||
<div style="font-size: 0.8em; font-weight: 500">Host: {{ member.host }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- BD Leader 标签内容 -->
|
||||
<div v-if="activeTab === 2">
|
||||
<div v-if="activeTab === 2 && BDLeaderData.billTitle">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<div style="font-weight: 600">2025.10.01-2025.10.15:</div>
|
||||
<div style="font-weight: 600">{{ BDLeaderData.billTitle }}</div>
|
||||
<img
|
||||
src="../../assets/icon/records.png"
|
||||
alt=""
|
||||
@ -267,14 +274,15 @@
|
||||
/>
|
||||
</div>
|
||||
<div style="font-size: 0.8em; font-weight: 600; margin-bottom: 12px">
|
||||
Team total recharge: $400 Team total salary: $400
|
||||
Team total recharge: ${{ BDLeaderData.totalRecharge || 0 }}, Team total salary: ${{
|
||||
BDLeaderData.totalSalary || 0
|
||||
}}
|
||||
</div>
|
||||
|
||||
<!-- 团队成员列表 -->
|
||||
<div style="display: flex; flex-direction: column; gap: 12px">
|
||||
<div
|
||||
v-for="member in bdLeaderMembers"
|
||||
:key="member.id"
|
||||
v-for="BDInfo in BDLeaderData.memberBillList"
|
||||
style="
|
||||
background-color: white;
|
||||
padding: 16px;
|
||||
@ -296,7 +304,7 @@
|
||||
"
|
||||
>
|
||||
<img
|
||||
:src="member.avatar"
|
||||
:src="BDInfo.agentAvatar || ''"
|
||||
alt=""
|
||||
style="
|
||||
display: block;
|
||||
@ -318,10 +326,10 @@
|
||||
white-space: nowrap;
|
||||
"
|
||||
>
|
||||
{{ member.name }}
|
||||
{{ BDInfo.agentName }}
|
||||
</div>
|
||||
<div style="color: rgba(0, 0, 0, 0.4); font-size: 0.8em; font-weight: 500">
|
||||
ID: {{ member.id }}
|
||||
ID: {{ BDInfo.agentAccount }}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@ -333,10 +341,10 @@
|
||||
"
|
||||
>
|
||||
<div style="font-size: 0.8em; font-weight: 500">
|
||||
Team Salary: ${{ member.salary }}
|
||||
Team Salary: ${{ BDInfo.teamSalaryAmount }}
|
||||
</div>
|
||||
<div style="font-size: 0.8em; font-weight: 500">
|
||||
Agencies: {{ member.agencies }}
|
||||
Agencies: {{ BDInfo.teamMemberCount }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -369,7 +377,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 等级卡片 -->
|
||||
<!-- 总体信息 -->
|
||||
<div
|
||||
style="
|
||||
box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.25);
|
||||
@ -380,97 +388,95 @@
|
||||
>
|
||||
<div>
|
||||
<div style="display: grid; gap: 4px">
|
||||
<div style="font-size: 0.9em; font-weight: 600">Total income: $1000</div>
|
||||
<div style="font-size: 0.9em; font-weight: 600">Previous period income: $1000</div>
|
||||
<div style="font-size: 0.9em; font-weight: 600">
|
||||
Total income: ${{
|
||||
currentHistoryType === 'bd' ? BDSalary.totalIncome : BDLeaderSalary.totalIncome
|
||||
}}
|
||||
</div>
|
||||
<div style="font-size: 0.9em; font-weight: 600">
|
||||
Previous period income: ${{
|
||||
currentHistoryType === 'bd'
|
||||
? BDSalary.previousPeriodIncome
|
||||
: BDLeaderSalary.previousPeriodIncome
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 历史薪资列表 -->
|
||||
<div style="overflow-y: auto" class="salaryList">
|
||||
<!-- 薪资列表 -->
|
||||
<div style="display: flex; flex-direction: column; gap: 8px">
|
||||
<!-- BD 历史记录 -->
|
||||
<!-- BD -->
|
||||
<template v-if="currentHistoryType === 'bd'">
|
||||
<historySalary type="In Progress" long="true">
|
||||
<template v-slot:content>
|
||||
<div>2025.10.16-2025.10.31:</div>
|
||||
<div style="font-size: 0.9em">Number of teams: 5</div>
|
||||
<historySalary
|
||||
v-for="income in BDSalary.incomeDetails"
|
||||
:type="income.statusText"
|
||||
long="true"
|
||||
@showMore="showReportDetail(income.billBelong)"
|
||||
>
|
||||
<template v-if="income.statusText == 'In Progress'" v-slot:content>
|
||||
<div>{{ income.billTitle }}</div>
|
||||
<div style="font-size: 0.9em">Number of teams: {{ income.agencyNumber }}</div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="font-size: 0.9em">Team salary: $400</div>
|
||||
<div style="font-size: 0.9em">BD income (salary): $12 (3%)</div>
|
||||
<div style="font-size: 0.9em">
|
||||
Team salary: ${{ income.teamSalaryAmount }}
|
||||
</div>
|
||||
<div style="font-size: 0.9em">
|
||||
BD income (salary): ${{ income.bdIncomeSalary || 0 }} ({{
|
||||
income.bdRatioSalary || 0
|
||||
}}%)
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="font-size: 0.9em">Team salary: $400</div>
|
||||
<div style="font-size: 0.9em">BD income (salary): $12 (3%)</div>
|
||||
<div style="font-size: 0.9em">
|
||||
Team top-up: ${{ income.teamRechargeAmount }}
|
||||
</div>
|
||||
<div style="font-size: 0.9em">
|
||||
BD income (top-up): ${{ income.bdIncomeRecharge || 0 }} ({{
|
||||
income.bdRatioRecharge || 0
|
||||
}}%)
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</historySalary>
|
||||
<historySalary type="Completed" v-for="value in 5" @showMore="showReportDetail()">
|
||||
<template v-slot:content>
|
||||
<div>2025.10.16-2025.10.31:</div>
|
||||
<div style="font-size: 0.9em">Number Of Teams: 5</div>
|
||||
|
||||
<template v-else v-slot:content>
|
||||
<div>{{ income.billTitle }}</div>
|
||||
<div style="font-size: 0.9em">Number Of Teams: {{ income.agencyNumber }}</div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="font-size: 0.9em">Number Of Teams: 5</div>
|
||||
<div style="font-size: 0.9em">BD income (salary): $60 (6%)</div>
|
||||
<div style="font-size: 0.9em">
|
||||
Team top-up: ${{ income.teamRechargeAmount }}
|
||||
</div>
|
||||
<div style="font-size: 0.9em">
|
||||
BD income (top-up): ${{ income.bdIncomeRecharge || 0 }} ({{
|
||||
income.bdRatioRecharge || 0
|
||||
}}%)
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</historySalary>
|
||||
</template>
|
||||
|
||||
<!-- BD Leader 历史记录 -->
|
||||
<!-- BD Leader -->
|
||||
<template v-else-if="currentHistoryType === 'bdLeader'">
|
||||
<!-- 进行中的记录 -->
|
||||
<historySalary type="In Progress">
|
||||
<template v-slot:content>
|
||||
<div>2025.10.16-2025.10.31:</div>
|
||||
<div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px">
|
||||
<div>Number Of BDs: 5</div>
|
||||
<div>Team Salary: $400</div>
|
||||
</div>
|
||||
</template>
|
||||
</historySalary>
|
||||
|
||||
<!-- 已完成的记录 -->
|
||||
<historySalary
|
||||
type="Completed"
|
||||
v-for="record in bdLeaderHistory"
|
||||
:key="record.id"
|
||||
@showMore="showReportDetail()"
|
||||
v-for="income in BDLeaderSalary.incomeDetails"
|
||||
:type="income.statusText"
|
||||
@showMore="showReportDetail(income.billBelong)"
|
||||
>
|
||||
<template v-slot:content>
|
||||
<div>{{ record.period }}:</div>
|
||||
<template v-if="income.statusText == 'In Progress'" v-slot:content>
|
||||
<div>{{ income.billTitle }}</div>
|
||||
<div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px">
|
||||
<div>Number Of Teams: {{ record.teamCount }}</div>
|
||||
<div>Team Top-Up: ${{ record.topUp }}</div>
|
||||
<div>Number Of BDs: {{ income.bdNumber }}</div>
|
||||
<div>Team Salary: ${{ income.teamSalaryAmount }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</historySalary>
|
||||
<historySalary
|
||||
type="Completed"
|
||||
v-for="record in bdLeaderHistory"
|
||||
:key="record.id"
|
||||
@showMore="showReportDetail()"
|
||||
>
|
||||
<template v-slot:content>
|
||||
<div>{{ record.period }}:</div>
|
||||
<div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px">
|
||||
<div>Number Of Teams: {{ record.teamCount }}</div>
|
||||
<div>Team Top-Up: ${{ record.topUp }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</historySalary>
|
||||
<historySalary
|
||||
type="Completed"
|
||||
v-for="record in bdLeaderHistory"
|
||||
:key="record.id"
|
||||
@showMore="showReportDetail()"
|
||||
>
|
||||
<template v-slot:content>
|
||||
<div>{{ record.period }}:</div>
|
||||
<div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px">
|
||||
<div>Number Of Teams: {{ record.teamCount }}</div>
|
||||
<div>Team Top-Up: ${{ record.topUp }}</div>
|
||||
</div>
|
||||
|
||||
<template v-else v-slot:content>
|
||||
<div>{{ income.billTitle }}</div>
|
||||
<div>Number Of Teams: {{ income.bdNumber }}</div>
|
||||
<div>Team Top-Up: ${{ income.teamSalaryAmount }}</div>
|
||||
</template>
|
||||
</historySalary>
|
||||
</template>
|
||||
@ -480,7 +486,7 @@
|
||||
|
||||
<!-- more -->
|
||||
<div v-if="showMore">
|
||||
<!-- 收入详情 -->
|
||||
<!-- BD -->
|
||||
<div
|
||||
v-if="currentHistoryType === 'bd'"
|
||||
style="
|
||||
@ -495,12 +501,14 @@
|
||||
"
|
||||
@click.stop
|
||||
>
|
||||
<div style="font-weight: 600">2025.10.01-2025.10.15:</div>
|
||||
<div style="font-weight: 600">{{ SalaryMore.period }}</div>
|
||||
<div style="font-size: 0.7em; font-weight: 600">
|
||||
Team total recharge: $400 Team total salary: $400
|
||||
Team total recharge: ${{ SalaryMore.teamTotalRecharge }}, Team total salary: ${{
|
||||
SalaryMore.teamTotalSalary
|
||||
}}
|
||||
</div>
|
||||
<div
|
||||
v-for="value in 3"
|
||||
v-for="member in SalaryMore.memberDetails"
|
||||
style="
|
||||
background-color: white;
|
||||
padding: 16px;
|
||||
@ -522,7 +530,7 @@
|
||||
"
|
||||
>
|
||||
<img
|
||||
:src="''"
|
||||
:src="member.userAvatar"
|
||||
alt=""
|
||||
style="
|
||||
display: block;
|
||||
@ -544,10 +552,10 @@
|
||||
white-space: nowrap;
|
||||
"
|
||||
>
|
||||
aaaaa
|
||||
{{ member.userName }}
|
||||
</div>
|
||||
<div style="color: rgba(0, 0, 0, 0.4); font-size: 0.8em; font-weight: 500">
|
||||
ID: 321654
|
||||
ID: {{ member.account }}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@ -558,14 +566,16 @@
|
||||
justify-content: space-around;
|
||||
"
|
||||
>
|
||||
<div style="font-size: 0.8em; font-weight: 500">Salary: $100</div>
|
||||
<div style="font-size: 0.8em; font-weight: 500">Recharge: $500</div>
|
||||
<div style="font-size: 0.8em; font-weight: 500">Host:8</div>
|
||||
<div style="font-size: 0.8em; font-weight: 500">Salary: ${{ member.salary }}</div>
|
||||
<div style="font-size: 0.8em; font-weight: 500">
|
||||
Recharge: ${{ member.recharge }}
|
||||
</div>
|
||||
<div style="font-size: 0.8em; font-weight: 500">Host:{{ member.hostCount }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 团队收入详情 -->
|
||||
<!-- BDleader -->
|
||||
<div
|
||||
v-if="currentHistoryType === 'bdLeader'"
|
||||
style="
|
||||
@ -580,10 +590,12 @@
|
||||
"
|
||||
@click.stop
|
||||
>
|
||||
<div style="font-weight: 600">2025.10.01-2025.10.15:</div>
|
||||
<div style="font-size: 0.7em; font-weight: 600">Team Salary: $400 BD number:400</div>
|
||||
<div style="font-weight: 600">{{ SalaryMore.period }}</div>
|
||||
<div style="font-size: 0.7em; font-weight: 600">
|
||||
Team Salary: ${{ SalaryMore.teamSalary }}, BD number:{{ SalaryMore.bdNumber }}
|
||||
</div>
|
||||
<div
|
||||
v-for="value in 3"
|
||||
v-for="member in SalaryMore.memberDetails"
|
||||
style="
|
||||
background-color: white;
|
||||
padding: 16px;
|
||||
@ -605,7 +617,7 @@
|
||||
"
|
||||
>
|
||||
<img
|
||||
:src="''"
|
||||
:src="member.bdUserAvatar || ''"
|
||||
alt=""
|
||||
style="
|
||||
display: block;
|
||||
@ -627,10 +639,10 @@
|
||||
white-space: nowrap;
|
||||
"
|
||||
>
|
||||
aaaaa
|
||||
{{ member.bdUserName }}
|
||||
</div>
|
||||
<div style="color: rgba(0, 0, 0, 0.4); font-size: 0.8em; font-weight: 500">
|
||||
ID: 321654
|
||||
ID: {{ member.account }}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@ -641,8 +653,10 @@
|
||||
justify-content: space-around;
|
||||
"
|
||||
>
|
||||
<div style="font-size: 0.8em; font-weight: 500">Salary: $100</div>
|
||||
<div style="font-size: 0.8em; font-weight: 500">Agencies:8</div>
|
||||
<div style="font-size: 0.8em; font-weight: 500">Salary: ${{ member.salary }}</div>
|
||||
<div style="font-size: 0.8em; font-weight: 500">
|
||||
Agencies:{{ member.agencyCount }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -660,6 +674,8 @@ import { isInApp } from '@/utils/appBridge.js'
|
||||
import maskLayer from '@/components/MaskLayer.vue'
|
||||
import { clearSelectedPayee } from '@/utils/payeeStore.js'
|
||||
import historySalary from '@/components/historySalary.vue'
|
||||
import { getBdMemberBillList, getBdHistory, getBdHistoryMore } from '@/api/bdCenter.js'
|
||||
import { getBdLeaderHistory, getBdLeaderHistoryMore } from '@/api/bdLeaderCenter'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
@ -672,34 +688,20 @@ const tabs = ref([
|
||||
const activeTab = ref(1)
|
||||
const showHistory = ref(false)
|
||||
const showMore = ref(false)
|
||||
const selectedRecord = ref(null)
|
||||
const currentHistoryType = ref('bd') // 'bd' 或 'bdLeader'
|
||||
|
||||
// BD Leader 历史记录数据
|
||||
const bdLeaderHistory = ref([
|
||||
{ id: 1, period: '2025.10.01-2025.10.15', teamCount: 5, topUp: 500 },
|
||||
{ id: 2, period: '2025.10.01-2025.10.15', teamCount: 5, topUp: 1000 },
|
||||
])
|
||||
const BDData = ref({}) // BD成员账单列表
|
||||
const BDLeaderData = ref({}) // BDLeader成员账单列表
|
||||
const BDSalary = ref({}) // BD Salary
|
||||
const BDLeaderSalary = ref({}) // BDLeader Salary
|
||||
|
||||
const SalaryMore = ref({}) // BD Salary More
|
||||
|
||||
// 遮罩层显示状态
|
||||
const maskLayerShow = computed(() => {
|
||||
return showHistory.value || showMore.value
|
||||
})
|
||||
|
||||
// BD 成员数据
|
||||
const bdMembers = ref([
|
||||
{ id: '1234567890', name: 'User1', salary: 100, recharge: 500, host: 8, avatar: '' },
|
||||
{ id: '1234567891', name: 'User2', salary: 100, recharge: 500, host: 8, avatar: '' },
|
||||
{ id: '1234567892', name: 'User3', salary: 100, recharge: 500, host: 8, avatar: '' },
|
||||
])
|
||||
|
||||
// BD Leader 成员数据
|
||||
const bdLeaderMembers = ref([
|
||||
{ id: '1234567890', name: 'Leader1', salary: 200, agencies: 12, avatar: '' },
|
||||
{ id: '1234567891', name: 'Leader2', salary: 180, agencies: 10, avatar: '' },
|
||||
{ id: '1234567892', name: 'Leader3', salary: 150, agencies: 9, avatar: '' },
|
||||
])
|
||||
|
||||
// 用户信息
|
||||
const userInfo = ref({
|
||||
userNickname: 'User1',
|
||||
@ -720,8 +722,22 @@ const switchTab = (tabId) => {
|
||||
}
|
||||
|
||||
// 显示报告详情
|
||||
const showReportDetail = (record) => {
|
||||
selectedRecord.value = record
|
||||
const showReportDetail = async (billBelong) => {
|
||||
if (currentHistoryType.value === 'bd') {
|
||||
const resBdHistoryMore = await getBdHistoryMore(billBelong)
|
||||
if (resBdHistoryMore.status && resBdHistoryMore.body) {
|
||||
// 处理返回的数据
|
||||
console.log('BD History More:', resBdHistoryMore.body)
|
||||
SalaryMore.value = resBdHistoryMore.body || {}
|
||||
}
|
||||
} else if (currentHistoryType.value === 'bdLeader') {
|
||||
const resBdLeaderHistoryMore = await getBdLeaderHistoryMore(billBelong)
|
||||
if (resBdLeaderHistoryMore.status && resBdLeaderHistoryMore.body) {
|
||||
// 处理返回的数据
|
||||
console.log('BD History More:', resBdLeaderHistoryMore.body)
|
||||
SalaryMore.value = resBdLeaderHistoryMore.body || {}
|
||||
}
|
||||
}
|
||||
showHistory.value = false
|
||||
showMore.value = true
|
||||
}
|
||||
@ -730,8 +746,7 @@ const showReportDetail = (record) => {
|
||||
const closedPopup = () => {
|
||||
showHistory.value = false
|
||||
showMore.value = false
|
||||
selectedRecord.value = null
|
||||
currentHistoryType.value = 'bd'
|
||||
SalaryMore.value = {}
|
||||
}
|
||||
|
||||
// 默认头像处理
|
||||
@ -742,6 +757,14 @@ const defaultAvatarUrl = (e) => {
|
||||
e.target.src = new URL('/src/assets/images/WeeklyStar/defaultAvatar.png', import.meta.url).href
|
||||
}
|
||||
|
||||
// 前往政策页
|
||||
const gotoPolicy = () => {
|
||||
router.push({
|
||||
path: '/policy',
|
||||
query: { from: 'BDLead' },
|
||||
})
|
||||
}
|
||||
|
||||
// 前往收入页面
|
||||
const gotoIncome = () => {
|
||||
router.push('/available-income')
|
||||
@ -767,13 +790,70 @@ const getAvatarPlaceholder = () => {
|
||||
return userInfo.value.userNickname ? userInfo.value.userNickname.charAt(0).toUpperCase() : 'U'
|
||||
}
|
||||
|
||||
// 查询BD成员账单列表
|
||||
const apiGetBdMemberBillList = async () => {
|
||||
const res = await getBdMemberBillList('BD')
|
||||
if (res.status && res.body) {
|
||||
// 处理返回的数据
|
||||
// console.log('BD member bill list:', res.body)
|
||||
BDData.value = res.body || {}
|
||||
}
|
||||
}
|
||||
|
||||
// 查询BD成员账单列表
|
||||
const apiGetBdLeaderMemberBillList = async () => {
|
||||
const res = await getBdMemberBillList('BDLEADER')
|
||||
if (res.status && res.body) {
|
||||
// 处理返回的数据
|
||||
// console.log('BD member bill list:', res.body)
|
||||
BDLeaderData.value = res.body || {}
|
||||
}
|
||||
}
|
||||
|
||||
// 查询BD历史记录
|
||||
const apiGetBdHistory = async () => {
|
||||
const res = await getBdHistory()
|
||||
if (res.status && res.body) {
|
||||
// 处理返回的数据
|
||||
console.log('BD History:', res.body)
|
||||
BDSalary.value = res.body || {}
|
||||
}
|
||||
}
|
||||
|
||||
// 查询BD历史记录
|
||||
const apiGetBdLeaderHistory = async () => {
|
||||
const res = await getBdLeaderHistory()
|
||||
if (res.status && res.body) {
|
||||
// 处理返回的数据
|
||||
console.log('BD History:', res.body)
|
||||
BDLeaderSalary.value = res.body || {}
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化数据
|
||||
const initData = () => {
|
||||
apiGetBdMemberBillList() //BD成员账单
|
||||
apiGetBdHistory() //BD历史记录
|
||||
apiGetBdLeaderHistory() //BD Leader历史记录
|
||||
apiGetBdLeaderMemberBillList() //BD Leader成员账单
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
clearSelectedPayee()
|
||||
initData() // 初始化数据
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 保持原有的样式不变 */
|
||||
.bd-center {
|
||||
max-height: 100vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.bd-center::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.salaryList::-webkit-scrollbar {
|
||||
display: none;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user