diff --git a/src/views/BDCenterView.vue b/src/views/BDCenterView.vue
index da4d7e4..143a951 100644
--- a/src/views/BDCenterView.vue
+++ b/src/views/BDCenterView.vue
@@ -70,7 +70,7 @@
ID: {{ userInfo.id || userInfo.account }}
-
@@ -262,55 +262,50 @@
-
- {{ income.billTitle }}:
+ {{ income.billTitle }}
Number of teams: {{ income.agencyNumber }}
Team salary: ${{ income.teamSalaryAmount }}
-
BD income (salary): $12 (3%)
+
+ BD income (salary): ${{ income.bdIncomeSalary || 0 }} ({{
+ income.bdRatioSalary || 0
+ }}%)
+
Team top-up: ${{ income.teamRechargeAmount }}
-
BD income (top-up): $12 (3%)
+
+ BD income (top-up): ${{ income.bdIncomeRecharge || 0 }} ({{
+ income.bdRatioRecharge || 0
+ }}%)
+
- 2025.10.16-2025.10.31:
- Number Of Teams: 5
+ {{ income.billTitle }}
+ Number Of Teams: {{ income.agencyNumber }}
-
Number Of Teams: 5
-
BD income (salary): $60 (6%)
+
+ Team top-up: ${{ income.teamRechargeAmount }}
+
+
+ BD income (top-up): ${{ income.bdIncomeRecharge || 0 }} ({{
+ income.bdRatioRecharge || 0
+ }}%)
+
-
@@ -330,12 +325,14 @@
"
@click.stop
>
- 2025.10.01-2025.10.15:
+ {{ BDSalaryMore.period }}
- Team total recharge: $400 Team total salary: $400
+ Team total recharge: ${{ BDSalaryMore.teamTotalRecharge }}, Team total salary: ${{
+ BDSalaryMore.teamTotalSalary
+ }}
![]()
- aaaaa
+ {{ member.userName }}
- ID: 321654
+ ID: {{ member.account }}
-
Salary: $100
-
Recharge: $500
-
Host:8
+
Salary: ${{ member.salary }}
+
Recharge: ${{ member.recharge }}
+
Host:{{ member.hostCount }}
@@ -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连接状态 */
diff --git a/src/views/BDLeaderCenter/index.vue b/src/views/BDLeaderCenter/index.vue
index 0753b95..8135468 100644
--- a/src/views/BDLeaderCenter/index.vue
+++ b/src/views/BDLeaderCenter/index.vue
@@ -66,7 +66,7 @@
ID: {{ userInfo.id || userInfo.account || '1234567890' }}
-
@@ -87,6 +87,7 @@
+
-
2025.10.01-2025.10.15:
+
{{ BDData.billTitle }}
- Team total recharge: $400 Team total salary: $400
+ Team total recharge: ${{ BDData.totalRecharge }}, Team total salary: ${{
+ BDData.totalSalary
+ }}
![]()
- {{ member.name }}
+ {{ BDInfo.agentName }}
- ID: {{ member.id }}
+ ID: {{ BDInfo.agentAccount }}
-
Salary: ${{ member.salary }}
- Recharge: ${{ member.recharge }}
+ Salary: ${{ BDInfo.teamSalaryAmount }}
+
+
+ Recharge: ${{ BDInfo.teamRechargeAmount }}
+
+
+ Host:{{ BDInfo.teamMemberCount }}
-
Host: {{ member.host }}
-
+
-
2025.10.01-2025.10.15:
+
{{ BDLeaderData.billTitle }}
- Team total recharge: $400 Team total salary: $400
+ Team total recharge: ${{ BDLeaderData.totalRecharge || 0 }}, Team total salary: ${{
+ BDLeaderData.totalSalary || 0
+ }}
![]()
- {{ member.name }}
+ {{ BDInfo.agentName }}
- ID: {{ member.id }}
+ ID: {{ BDInfo.agentAccount }}
- Team Salary: ${{ member.salary }}
+ Team Salary: ${{ BDInfo.teamSalaryAmount }}
- Agencies: {{ member.agencies }}
+ Agencies: {{ BDInfo.teamMemberCount }}
@@ -369,7 +377,7 @@
-
+
-
Total income: $1000
-
Previous period income: $1000
+
+ Total income: ${{
+ currentHistoryType === 'bd' ? BDSalary.totalIncome : BDLeaderSalary.totalIncome
+ }}
+
+
+ Previous period income: ${{
+ currentHistoryType === 'bd'
+ ? BDSalary.previousPeriodIncome
+ : BDLeaderSalary.previousPeriodIncome
+ }}
+
+
-
-
+
-
-
- 2025.10.16-2025.10.31:
- Number of teams: 5
+
+
+ {{ income.billTitle }}
+ Number of teams: {{ income.agencyNumber }}
-
Team salary: $400
-
BD income (salary): $12 (3%)
+
+ Team salary: ${{ income.teamSalaryAmount }}
+
+
+ BD income (salary): ${{ income.bdIncomeSalary || 0 }} ({{
+ income.bdRatioSalary || 0
+ }}%)
+
-
Team salary: $400
-
BD income (salary): $12 (3%)
+
+ Team top-up: ${{ income.teamRechargeAmount }}
+
+
+ BD income (top-up): ${{ income.bdIncomeRecharge || 0 }} ({{
+ income.bdRatioRecharge || 0
+ }}%)
+
-
-
-
- 2025.10.16-2025.10.31:
- Number Of Teams: 5
+
+
+ {{ income.billTitle }}
+ Number Of Teams: {{ income.agencyNumber }}
-
Number Of Teams: 5
-
BD income (salary): $60 (6%)
+
+ Team top-up: ${{ income.teamRechargeAmount }}
+
+
+ BD income (top-up): ${{ income.bdIncomeRecharge || 0 }} ({{
+ income.bdRatioRecharge || 0
+ }}%)
+
-
+
-
-
-
- 2025.10.16-2025.10.31:
-
-
Number Of BDs: 5
-
Team Salary: $400
-
-
-
-
-
- {{ record.period }}:
+
+ {{ income.billTitle }}
-
Number Of Teams: {{ record.teamCount }}
-
Team Top-Up: ${{ record.topUp }}
+
Number Of BDs: {{ income.bdNumber }}
+
Team Salary: ${{ income.teamSalaryAmount }}
-
-
-
- {{ record.period }}:
-
-
Number Of Teams: {{ record.teamCount }}
-
Team Top-Up: ${{ record.topUp }}
-
-
-
-
-
- {{ record.period }}:
-
-
Number Of Teams: {{ record.teamCount }}
-
Team Top-Up: ${{ record.topUp }}
-
+
+
+ {{ income.billTitle }}
+ Number Of Teams: {{ income.bdNumber }}
+ Team Top-Up: ${{ income.teamSalaryAmount }}
@@ -480,7 +486,7 @@
-
+
-
2025.10.01-2025.10.15:
+
{{ SalaryMore.period }}
- Team total recharge: $400 Team total salary: $400
+ Team total recharge: ${{ SalaryMore.teamTotalRecharge }}, Team total salary: ${{
+ SalaryMore.teamTotalSalary
+ }}
![]()
- aaaaa
+ {{ member.userName }}
- ID: 321654
+ ID: {{ member.account }}
-
Salary: $100
-
Recharge: $500
-
Host:8
+
Salary: ${{ member.salary }}
+
+ Recharge: ${{ member.recharge }}
+
+
Host:{{ member.hostCount }}
-
+
-
2025.10.01-2025.10.15:
-
Team Salary: $400 BD number:400
+
{{ SalaryMore.period }}
+
+ Team Salary: ${{ SalaryMore.teamSalary }}, BD number:{{ SalaryMore.bdNumber }}
+
![]()
- aaaaa
+ {{ member.bdUserName }}
- ID: 321654
+ ID: {{ member.account }}
-
Salary: $100
-
Agencies:8
+
Salary: ${{ member.salary }}
+
+ Agencies:{{ member.agencyCount }}
+
@@ -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() // 初始化数据
})