feat(BDLeader): 新增删除功能(未接接口)
This commit is contained in:
parent
b957d5b862
commit
84be300945
@ -333,11 +333,12 @@
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 8px;
|
||||
"
|
||||
>
|
||||
<div style="font-size: 0.8em; font-weight: 600">Number of BD:0</div>
|
||||
<div style="font-size: 0.8em; font-weight: 600">
|
||||
{{ t('total_team_salary') }}: ${{ BDLeaderData.totalSalary }}
|
||||
</div>
|
||||
@ -435,7 +436,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 更多按钮 -->
|
||||
<!-- 删除按钮 -->
|
||||
<div
|
||||
style="
|
||||
font-size: 0.7em;
|
||||
@ -446,6 +447,7 @@
|
||||
color: #ff4c4c;
|
||||
font-weight: 500;
|
||||
"
|
||||
@click="removeBD(BDInfo)"
|
||||
>
|
||||
Remove This BD >
|
||||
</div>
|
||||
@ -457,6 +459,74 @@
|
||||
|
||||
<!-- 遮罩层 -->
|
||||
<maskLayer :maskLayerShow="maskLayerShow" @click="closedPopup">
|
||||
<!-- 确认弹窗 -->
|
||||
<div
|
||||
v-if="showRemovePopup"
|
||||
style="
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
"
|
||||
@click.stop
|
||||
>
|
||||
<div
|
||||
style="
|
||||
width: 80%;
|
||||
border-radius: 12px;
|
||||
background: #fff;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
"
|
||||
>
|
||||
<div style="color: rgba(0, 0, 0, 0.8); font-weight: 800">{{ t('tips') }}</div>
|
||||
<div style="color: rgba(0, 0, 0, 0.5); font-weight: 600; text-align: center">
|
||||
Are you sure you want to remove ID:123445678 from your BD Leader list?
|
||||
</div>
|
||||
<div style="color: rgba(0, 0, 0, 0.5); font-weight: 600; text-align: center">
|
||||
Are you sure you want to remove ID:123445678 from your BD list?
|
||||
</div>
|
||||
<div
|
||||
style="width: 100%; display: flex; justify-content: space-around; align-items: center"
|
||||
>
|
||||
<div
|
||||
style="
|
||||
padding: 12px 20px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid #e6e6e6;
|
||||
color: rgba(0, 0, 0, 0.4);
|
||||
font-weight: 800;
|
||||
"
|
||||
@click="closedPopup"
|
||||
>
|
||||
{{ t('cancel') }}
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
padding: 12px 20px;
|
||||
border-radius: 12px;
|
||||
background: linear-gradient(
|
||||
152deg,
|
||||
rgba(198, 112, 255, 0.6) 7.01%,
|
||||
rgba(119, 38, 255, 0.6) 92.99%
|
||||
);
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
font-weight: 800;
|
||||
"
|
||||
@click="Confirm"
|
||||
>
|
||||
{{ t('confirm') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 贴底抽屉 -->
|
||||
<div style="position: fixed; bottom: 0; width: 100%">
|
||||
<!-- 历史收入 - 使用相同组件,根据类型显示不同内容 -->
|
||||
<div
|
||||
@ -596,6 +666,8 @@
|
||||
|
||||
<!-- BD Leader -->
|
||||
<template v-else-if="currentHistoryType === 'bdLeader'">
|
||||
<div style="font-weight: 600">Income Details:</div>
|
||||
|
||||
<!-- 已完成的记录 -->
|
||||
<historySalary
|
||||
v-for="income in BDLeaderSalary.incomeDetails"
|
||||
@ -769,11 +841,16 @@
|
||||
<!-- 日期 -->
|
||||
<div style="font-weight: 600">{{ SalaryMore.period }}</div>
|
||||
|
||||
<!-- 总收入 -->
|
||||
<div style="font-size: 0.7em; font-weight: 600">
|
||||
{{ t('team_salary') }}: ${{ SalaryMore.teamSalary }}, {{ t('bd_number') }}:{{
|
||||
SalaryMore.bdNumber
|
||||
}}
|
||||
<!-- 总体信息 -->
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<!-- 总收入 -->
|
||||
<div style="font-size: 0.7em; font-weight: 600">
|
||||
{{ t('team_salary') }}: ${{ SalaryMore.teamSalary }}
|
||||
</div>
|
||||
<!-- BD数量 -->
|
||||
<div style="font-size: 0.7em; font-weight: 600">
|
||||
{{ t('bd_number') }}:{{ SalaryMore.bdNumber }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- BD列表 -->
|
||||
@ -905,6 +982,7 @@ const tabs = ref([
|
||||
const activeTab = ref(1)
|
||||
const showHistory = ref(false)
|
||||
const showMore = ref(false)
|
||||
const showRemovePopup = ref(false)
|
||||
const currentHistoryType = ref('bd') // 'bd' 或 'bdLeader'
|
||||
|
||||
const BDData = ref({}) // BD成员账单列表
|
||||
@ -917,7 +995,7 @@ const SalaryMore = ref({}) // BD Salary More
|
||||
|
||||
// 遮罩层显示状态
|
||||
const maskLayerShow = computed(() => {
|
||||
return showHistory.value || showMore.value
|
||||
return showHistory.value || showMore.value || showRemovePopup.value
|
||||
})
|
||||
|
||||
const records = (historyType) => {
|
||||
@ -951,15 +1029,25 @@ const showReportDetail = async (billBelong) => {
|
||||
showMore.value = true
|
||||
}
|
||||
|
||||
// 删除BD
|
||||
const removeBD = (BDItem) => {
|
||||
showRemovePopup.value = true
|
||||
}
|
||||
|
||||
// 确认删除
|
||||
const Confirm = () => {
|
||||
closedPopup()
|
||||
}
|
||||
|
||||
// 关闭弹窗
|
||||
const closedPopup = () => {
|
||||
showHistory.value = false
|
||||
showMore.value = false
|
||||
showRemovePopup.value = false
|
||||
SalaryMore.value = {}
|
||||
}
|
||||
|
||||
// 默认头像处理
|
||||
|
||||
const defaultAvatarUrl = (e) => {
|
||||
console.log('头像资源出错')
|
||||
e.target.onerror = null //防止循环
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user