feat(dashboard): 添加充值汇总
This commit is contained in:
parent
131b3ed53a
commit
4ea35a094e
|
@ -24,3 +24,12 @@ export function getMonthlyPerformance() {
|
|||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 充值汇总数据
|
||||
export function getRechargeSummary() {
|
||||
return request({
|
||||
url: '/system/manage/board/recharge-summary',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -16,120 +16,145 @@
|
|||
<div class="dashboard-card-label">会员总数</div>
|
||||
<div class="dashboard-card-value">{{ memberSummary.memberTotal || 0 }}</div>
|
||||
</div> -->
|
||||
<div class="dashboard-card">
|
||||
<div class="dashboard-card-label">当月新增会员</div>
|
||||
<div class="dashboard-card-value">{{ memberSummary.memberMonth || 0 }}</div>
|
||||
<div class="dashboard-card dashboard-card--member dashboard-card--month-member">
|
||||
<div class="dashboard-card-header">
|
||||
<div class="dashboard-card-label">当月新增会员</div>
|
||||
<div class="dashboard-card-value">{{ memberSummary.memberMonth || 0 }}</div>
|
||||
</div>
|
||||
<div v-if="memberSummary.memberMonthLevelList && memberSummary.memberMonthLevelList.length > 0" class="dashboard-card-level-list">
|
||||
<div v-for="level in memberSummary.memberMonthLevelList" :key="`month-${level.gradeName}`" class="dashboard-card-level-item">
|
||||
<span class="level-name">{{ level.gradeName }}:</span>
|
||||
<span class="level-count">{{ level.memberTotal }}人</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dashboard-card">
|
||||
<div class="dashboard-card-label">昨日新增会员</div>
|
||||
<div class="dashboard-card-value">{{ memberSummary.memberYesterday || 0 }}</div>
|
||||
<div class="dashboard-card dashboard-card--member dashboard-card--yesterday-member">
|
||||
<div class="dashboard-card-header">
|
||||
<div class="dashboard-card-label">昨日新增会员</div>
|
||||
<div class="dashboard-card-value">{{ memberSummary.memberYesterday || 0 }}</div>
|
||||
</div>
|
||||
<div v-if="memberSummary.memberYesterdayLevelList && memberSummary.memberYesterdayLevelList.length > 0" class="dashboard-card-level-list">
|
||||
<div v-for="level in memberSummary.memberYesterdayLevelList" :key="`yesterday-${level.gradeName}`" class="dashboard-card-level-item">
|
||||
<span class="level-name">{{ level.gradeName }}:</span>
|
||||
<span class="level-count">{{ level.memberTotal }}人</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dashboard-card">
|
||||
<div class="dashboard-card-label">今日新增会员</div>
|
||||
<div class="dashboard-card-value">{{ memberSummary.memberToday || 0 }}</div>
|
||||
<div class="dashboard-card dashboard-card--member dashboard-card--today-member">
|
||||
<div class="dashboard-card-header">
|
||||
<div class="dashboard-card-label">今日新增会员</div>
|
||||
<div class="dashboard-card-value">{{ memberSummary.memberToday || 0 }}</div>
|
||||
</div>
|
||||
<div v-if="memberSummary.memberTodayLevelList && memberSummary.memberTodayLevelList.length > 0" class="dashboard-card-level-list">
|
||||
<div v-for="level in memberSummary.memberTodayLevelList" :key="`today-${level.gradeName}`" class="dashboard-card-level-item">
|
||||
<span class="level-name">{{ level.gradeName }}:</span>
|
||||
<span class="level-count">{{ level.memberTotal }}人</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 业绩数据卡片 -->
|
||||
<div class="dashboard-card-group dashboard-card-group--today">
|
||||
<div class="dashboard-card-title dashboard-card-title--today">今日业绩</div>
|
||||
<div class="dashboard-card-list dashboard-card-list--performance">
|
||||
<div class="dashboard-card dashboard-card--performance dashboard-card--today">
|
||||
<div class="dashboard-card-label">首购金额</div>
|
||||
<div class="dashboard-card-value dashboard-card-value--today">{{ dailyPerformance.today && dailyPerformance.today.firstAmount || '0.00' }}</div>
|
||||
<!-- 业绩数据卡片 (统一结构) -->
|
||||
<div class="dashboard-card-group dashboard-card-group--performance-overview">
|
||||
<div class="dashboard-card-title">金额汇总</div>
|
||||
<div class="performance-overview-container">
|
||||
<!-- 本月业绩 -->
|
||||
<div class="performance-section performance-section--month">
|
||||
<div class="performance-section-title performance-section-title--month">本月数据</div>
|
||||
<div class="performance-summary-header">
|
||||
<span class="performance-summary-label">总金额</span>
|
||||
<span class="performance-summary-value">{{ getSum(monthlyPerformance.firstAmount, monthlyPerformance.repAmount) }}</span>
|
||||
</div>
|
||||
<div class="performance-details-list">
|
||||
<div class="performance-detail-item">
|
||||
<span class="detail-label">首购金额:</span>
|
||||
<span class="detail-value">{{ monthlyPerformance.firstAmount || '0.00' }}</span>
|
||||
</div>
|
||||
<div class="performance-detail-item">
|
||||
<span class="detail-label">复购金额:</span>
|
||||
<span class="detail-value">{{ monthlyPerformance.repAmount || '0.00' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="dashboard-card dashboard-card--performance dashboard-card--today">
|
||||
<div class="dashboard-card-label">首购业绩</div>
|
||||
<div class="dashboard-card-value dashboard-card-value--today">{{ dailyPerformance.today && dailyPerformance.today.firstAchieve || '0.00' }}</div>
|
||||
</div> -->
|
||||
<div class="dashboard-card dashboard-card--performance dashboard-card--today">
|
||||
<div class="dashboard-card-label">复购金额</div>
|
||||
<div class="dashboard-card-value dashboard-card-value--today">{{ dailyPerformance.today && dailyPerformance.today.repAmount || '0.00' }}</div>
|
||||
<!-- 昨日业绩 -->
|
||||
<div class="performance-section performance-section--yesterday">
|
||||
<div class="performance-section-title performance-section-title--yesterday">昨日数据</div>
|
||||
<div class="performance-summary-header">
|
||||
<span class="performance-summary-label">总金额</span>
|
||||
<span class="performance-summary-value">{{ getSum(dailyPerformance.yesterday && dailyPerformance.yesterday.firstAmount, dailyPerformance.yesterday && dailyPerformance.yesterday.repAmount) }}</span>
|
||||
</div>
|
||||
<div class="performance-details-list">
|
||||
<div class="performance-detail-item">
|
||||
<span class="detail-label">首购金额:</span>
|
||||
<span class="detail-value">{{ dailyPerformance.yesterday && dailyPerformance.yesterday.firstAmount || '0.00' }}</span>
|
||||
</div>
|
||||
<div class="performance-detail-item">
|
||||
<span class="detail-label">复购金额:</span>
|
||||
<span class="detail-value">{{ dailyPerformance.yesterday && dailyPerformance.yesterday.repAmount || '0.00' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="dashboard-card dashboard-card--performance dashboard-card--today">
|
||||
<div class="dashboard-card-label">复购业绩</div>
|
||||
<div class="dashboard-card-value dashboard-card-value--today">{{ dailyPerformance.today && dailyPerformance.today.repAchieve || '0.00' }}</div>
|
||||
</div> -->
|
||||
<div class="dashboard-card dashboard-card--performance dashboard-card--today dashboard-card--total-amount">
|
||||
<div class="dashboard-card-label">总金额</div>
|
||||
<div class="dashboard-card-value dashboard-card-value--today">{{ getSum(dailyPerformance.today && dailyPerformance.today.firstAmount, dailyPerformance.today && dailyPerformance.today.repAmount) }}</div>
|
||||
<!-- 今日业绩 -->
|
||||
<div class="performance-section performance-section--today">
|
||||
<div class="performance-section-title performance-section-title--today">今日数据</div>
|
||||
<div class="performance-summary-header">
|
||||
<span class="performance-summary-label">总金额</span>
|
||||
<span class="performance-summary-value">{{ getSum(dailyPerformance.today && dailyPerformance.today.firstAmount, dailyPerformance.today && dailyPerformance.today.repAmount) }}</span>
|
||||
</div>
|
||||
<div class="performance-details-list">
|
||||
<div class="performance-detail-item">
|
||||
<span class="detail-label">首购金额:</span>
|
||||
<span class="detail-value">{{ dailyPerformance.today && dailyPerformance.today.firstAmount || '0.00' }}</span>
|
||||
</div>
|
||||
<div class="performance-detail-item">
|
||||
<span class="detail-label">复购金额:</span>
|
||||
<span class="detail-value">{{ dailyPerformance.today && dailyPerformance.today.repAmount || '0.00' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="dashboard-total-row">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dashboard-card dashboard-card--performance dashboard-card--today dashboard-card--total-achievement">
|
||||
<div class="dashboard-card-label">总业绩</div>
|
||||
<div class="dashboard-card-value dashboard-card-value--today">{{ getSum(dailyPerformance.today && dailyPerformance.today.firstAchieve, dailyPerformance.today && dailyPerformance.today.repAchieve) }}</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- 充值汇总模块 -->
|
||||
<div class="dashboard-card-group dashboard-card-group--recharge-summary">
|
||||
<div class="dashboard-card-title">充值汇总</div>
|
||||
<div class="recharge-summary-container">
|
||||
<!-- 本月充值 -->
|
||||
<div class="recharge-section recharge-section--month">
|
||||
<div class="recharge-section-title recharge-section-title--month">本月充值</div>
|
||||
<ul v-if="rechargeSummary.rechargeMonthLevelList && rechargeSummary.rechargeMonthLevelList.length > 0" class="recharge-account-list">
|
||||
<li v-for="account in rechargeSummary.rechargeMonthLevelList" :key="`month-recharge-${account.accountName}`" class="recharge-account-item">
|
||||
<span class="account-name">{{ account.accountName }}</span>
|
||||
<span class="account-amount">{{ formatAmountWithCommas(account.rechargeAmount) }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
<div v-else class="no-data-placeholder">暂无数据</div>
|
||||
</div>
|
||||
<!-- 昨日充值 -->
|
||||
<div class="recharge-section recharge-section--yesterday">
|
||||
<div class="recharge-section-title recharge-section-title--yesterday">昨日充值</div>
|
||||
<ul v-if="rechargeSummary.rechargeYesterdayLevelList && rechargeSummary.rechargeYesterdayLevelList.length > 0" class="recharge-account-list">
|
||||
<li v-for="account in rechargeSummary.rechargeYesterdayLevelList" :key="`yesterday-recharge-${account.accountName}`" class="recharge-account-item">
|
||||
<span class="account-name">{{ account.accountName }}</span>
|
||||
<span class="account-amount">{{ formatAmountWithCommas(account.rechargeAmount) }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
<div v-else class="no-data-placeholder">暂无数据</div>
|
||||
</div>
|
||||
<!-- 今日充值 -->
|
||||
<div class="recharge-section recharge-section--today">
|
||||
<div class="recharge-section-title recharge-section-title--today">今日充值</div>
|
||||
<ul v-if="rechargeSummary.rechargeTodayList && rechargeSummary.rechargeTodayList.length > 0" class="recharge-account-list">
|
||||
<li v-for="account in rechargeSummary.rechargeTodayList" :key="`today-recharge-${account.accountName}`" class="recharge-account-item">
|
||||
<span class="account-name">{{ account.accountName }}</span>
|
||||
<span class="account-amount">{{ formatAmountWithCommas(account.rechargeAmount) }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
<div v-else class="no-data-placeholder">暂无数据</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dashboard-card-group dashboard-card-group--yesterday">
|
||||
<div class="dashboard-card-title dashboard-card-title--yesterday">昨日业绩</div>
|
||||
<div class="dashboard-card-list dashboard-card-list--performance">
|
||||
<div class="dashboard-card dashboard-card--performance dashboard-card--yesterday">
|
||||
<div class="dashboard-card-label">首购金额</div>
|
||||
<div class="dashboard-card-value">{{ dailyPerformance.yesterday && dailyPerformance.yesterday.firstAmount || '0.00' }}</div>
|
||||
</div>
|
||||
<!-- <div class="dashboard-card dashboard-card--performance dashboard-card--yesterday">
|
||||
<div class="dashboard-card-label">首购业绩</div>
|
||||
<div class="dashboard-card-value">{{ dailyPerformance.yesterday && dailyPerformance.yesterday.firstAchieve || '0.00' }}</div>
|
||||
</div> -->
|
||||
<div class="dashboard-card dashboard-card--performance dashboard-card--yesterday">
|
||||
<div class="dashboard-card-label">复购金额</div>
|
||||
<div class="dashboard-card-value">{{ dailyPerformance.yesterday && dailyPerformance.yesterday.repAmount || '0.00' }}</div>
|
||||
</div>
|
||||
<!-- <div class="dashboard-card dashboard-card--performance dashboard-card--yesterday">
|
||||
<div class="dashboard-card-label">复购业绩</div>
|
||||
<div class="dashboard-card-value">{{ dailyPerformance.yesterday && dailyPerformance.yesterday.repAchieve || '0.00' }}</div>
|
||||
</div> -->
|
||||
<div class="dashboard-card dashboard-card--performance dashboard-card--yesterday dashboard-card--total-amount">
|
||||
<div class="dashboard-card-label">总金额</div>
|
||||
<div class="dashboard-card-value">{{ getSum(dailyPerformance.yesterday && dailyPerformance.yesterday.firstAmount, dailyPerformance.yesterday && dailyPerformance.yesterday.repAmount) }}</div>
|
||||
</div>
|
||||
<!-- <div class="dashboard-total-row">
|
||||
|
||||
<div class="dashboard-card dashboard-card--performance dashboard-card--yesterday dashboard-card--total-achievement">
|
||||
<div class="dashboard-card-label">总业绩</div>
|
||||
<div class="dashboard-card-value dashboard-card-value--today">{{ getSum(dailyPerformance.yesterday && dailyPerformance.yesterday.firstAchieve, dailyPerformance.yesterday && dailyPerformance.yesterday.repAchieve) }}</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="dashboard-card-group dashboard-card-group--month">
|
||||
<div class="dashboard-card-title dashboard-card-title--month">本月业绩</div>
|
||||
<div class="dashboard-card-list dashboard-card-list--performance">
|
||||
<div class="dashboard-card dashboard-card--performance dashboard-card--month">
|
||||
<div class="dashboard-card-label">首购金额</div>
|
||||
<div class="dashboard-card-value">{{ monthlyPerformance.firstAmount || '0.00' }}</div>
|
||||
</div>
|
||||
<!-- <div class="dashboard-card dashboard-card--performance dashboard-card--month">
|
||||
<div class="dashboard-card-label">首购业绩</div>
|
||||
<div class="dashboard-card-value">{{ monthlyPerformance.firstAchieve || '0.00' }}</div>
|
||||
</div> -->
|
||||
<div class="dashboard-card dashboard-card--performance dashboard-card--month">
|
||||
<div class="dashboard-card-label">复购金额</div>
|
||||
<div class="dashboard-card-value">{{ monthlyPerformance.repAmount || '0.00' }}</div>
|
||||
</div>
|
||||
<!-- <div class="dashboard-card dashboard-card--performance dashboard-card--month">
|
||||
<div class="dashboard-card-label">复购业绩</div>
|
||||
<div class="dashboard-card-value">{{ monthlyPerformance.repAchieve || '0.00' }}</div>
|
||||
</div> -->
|
||||
<div class="dashboard-card dashboard-card--performance dashboard-card--month dashboard-card--total-amount">
|
||||
<div class="dashboard-card-label">总金额</div>
|
||||
<div class="dashboard-card-value">{{ getSum(monthlyPerformance.firstAmount, monthlyPerformance.repAmount) }}</div>
|
||||
</div>
|
||||
<!-- <div class="dashboard-total-row">
|
||||
<div class="dashboard-card dashboard-card--performance dashboard-card--month dashboard-card--total-amount">
|
||||
<div class="dashboard-card-label">总金额</div>
|
||||
<div class="dashboard-card-value">{{ getSum(monthlyPerformance.firstAmount, monthlyPerformance.repAmount) }}</div>
|
||||
</div>
|
||||
<div class="dashboard-card dashboard-card--performance dashboard-card--month dashboard-card--total-achievement">
|
||||
<div class="dashboard-card-label">总业绩</div>
|
||||
<div class="dashboard-card-value">{{ getSum(monthlyPerformance.firstAchieve, monthlyPerformance.repAchieve) }}</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -137,7 +162,7 @@
|
|||
<script>
|
||||
import topBarMixin from './mixins/top-bar-mixin'
|
||||
import topBar from '@/components/topBar'
|
||||
import { getMemberSummary, getDailyPerformance, getMonthlyPerformance } from '@/api/dashboard'
|
||||
import { getMemberSummary, getRechargeSummary, getDailyPerformance, getMonthlyPerformance } from '@/api/dashboard'
|
||||
export default {
|
||||
name: 'SummaryDashboard',
|
||||
components: {
|
||||
|
@ -149,6 +174,7 @@ export default {
|
|||
memberSummary: {},
|
||||
dailyPerformance: {},
|
||||
monthlyPerformance: {},
|
||||
rechargeSummary: {},
|
||||
defaultTabItem: 'summaryDashboard',
|
||||
userInfo: {},
|
||||
visible: false
|
||||
|
@ -161,68 +187,130 @@ export default {
|
|||
this.getDailyPerformance()
|
||||
this.getMonthlyPerformance()
|
||||
this.getApprovalStatus()
|
||||
this.getRechargeSummary()
|
||||
this.userInfo = JSON.parse(localStorage.getItem('userInfo'))
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
getMemberSummary() {
|
||||
// {
|
||||
// "msg": "操作成功",
|
||||
// "code": 200,
|
||||
// "data": {
|
||||
// "memberTotal": 145,
|
||||
// "memberToday": 0,
|
||||
// "memberYesterday": 0,
|
||||
// "memberMonth": 18
|
||||
// }
|
||||
// }
|
||||
getMemberSummary().then(res => {
|
||||
this.memberSummary = res.data
|
||||
})
|
||||
},
|
||||
getDailyPerformance() {
|
||||
// {
|
||||
// "msg": "操作成功",
|
||||
// "code": 200,
|
||||
// "data": {
|
||||
// "today": {
|
||||
// "firstAchieve": "0.00",
|
||||
// "firstAmount": "0.00",
|
||||
// "repAchieve": "0.00",
|
||||
// "repAmount": "0.00"
|
||||
// },
|
||||
// "yesterday": {
|
||||
// "firstAchieve": "0.00",
|
||||
// "firstAmount": "0.00",
|
||||
// "repAchieve": "1.29",
|
||||
// "repAmount": "5.40"
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
getDailyPerformance().then(res => {
|
||||
this.dailyPerformance = res.data
|
||||
})
|
||||
},
|
||||
// {
|
||||
// "msg": "操作成功",
|
||||
// "code": 200,
|
||||
// "data": {
|
||||
// "firstAchieve": "55.63",
|
||||
// "firstAmount": "199.80",
|
||||
// "repAchieve": "1.83",
|
||||
// "repAmount": "10.61"
|
||||
// }
|
||||
// }
|
||||
getMonthlyPerformance() {
|
||||
getMonthlyPerformance().then(res => {
|
||||
this.monthlyPerformance = res.data
|
||||
})
|
||||
},
|
||||
|
||||
// "msg": "操作成功",
|
||||
// "code": 200,
|
||||
// "data": {
|
||||
// "rechargeTodayList": [
|
||||
// {
|
||||
// "accountName": "现金账户",
|
||||
// "rechargeAmount": 0,
|
||||
// "sort": 0
|
||||
// },
|
||||
// {
|
||||
// "accountName": "消费账户",
|
||||
// "rechargeAmount": 0,
|
||||
// "sort": 0
|
||||
// },
|
||||
// {
|
||||
// "accountName": "奖金账户",
|
||||
// "rechargeAmount": 0,
|
||||
// "sort": 0
|
||||
// },
|
||||
// {
|
||||
// "accountName": "政策账户",
|
||||
// "rechargeAmount": 0,
|
||||
// "sort": 0
|
||||
// }
|
||||
// ],
|
||||
// "rechargeYesterdayLevelList": [
|
||||
// {
|
||||
// "accountName": "现金账户",
|
||||
// "rechargeAmount": 0,
|
||||
// "sort": 1
|
||||
// },
|
||||
// {
|
||||
// "accountName": "消费账户",
|
||||
// "rechargeAmount": 0,
|
||||
// "sort": 1
|
||||
// },
|
||||
// {
|
||||
// "accountName": "奖金账户",
|
||||
// "rechargeAmount": 0,
|
||||
// "sort": 1
|
||||
// },
|
||||
// {
|
||||
// "accountName": "政策账户",
|
||||
// "rechargeAmount": 0,
|
||||
// "sort": 1
|
||||
// }
|
||||
// ],
|
||||
// "rechargeMonthLevelList": [
|
||||
// {
|
||||
// "accountName": "现金账户",
|
||||
// "rechargeAmount": 809550000,
|
||||
// "sort": 2
|
||||
// },
|
||||
// {
|
||||
// "accountName": "消费账户",
|
||||
// "rechargeAmount": 809550000,
|
||||
// "sort": 2
|
||||
// },
|
||||
// {
|
||||
// "accountName": "奖金账户",
|
||||
// "rechargeAmount": 809000000,
|
||||
// "sort": 2
|
||||
// },
|
||||
// {
|
||||
// "accountName": "政策账户",
|
||||
// "rechargeAmount": 809000000,
|
||||
// "sort": 2
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
|
||||
getRechargeSummary() {
|
||||
console.log('getRechargeSummary')
|
||||
getRechargeSummary().then(res => {
|
||||
console.log('getRechargeSummary', res)
|
||||
this.rechargeSummary = res.data
|
||||
})
|
||||
},
|
||||
getSum(a, b) {
|
||||
// 字符串转数字后相加,保留两位小数
|
||||
const numA = parseFloat(a) || 0
|
||||
const numB = parseFloat(b) || 0
|
||||
return (numA + numB).toFixed(2)
|
||||
const sum = numA + numB
|
||||
// 直接截取两位小数,不四舍五入
|
||||
const truncatedSum = Math.floor(sum * 100) / 100
|
||||
// 格式化为两位小数的字符串
|
||||
let result = truncatedSum.toString()
|
||||
const decimalIndex = result.indexOf('.')
|
||||
if (decimalIndex === -1) {
|
||||
result += '.00'
|
||||
} else {
|
||||
const decimalPart = result.substring(decimalIndex + 1)
|
||||
if (decimalPart.length === 1) {
|
||||
result += '0'
|
||||
}
|
||||
}
|
||||
return result
|
||||
},
|
||||
formatAmountWithCommas(value) {
|
||||
const number = parseFloat(value)
|
||||
if (isNaN(number)) {
|
||||
return '0'
|
||||
}
|
||||
return number.toLocaleString('en-US')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -244,14 +332,14 @@ export default {
|
|||
background: #fff;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0,0,0,0.06);
|
||||
padding: 24px 32px 16px 32px;
|
||||
padding: 18px 24px 18px 24px;
|
||||
}
|
||||
|
||||
/* 基础分组标题样式 */
|
||||
.dashboard-card-title {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 20px; /* 统一标题下边距 */
|
||||
margin-bottom: 16px; /* 统一标题下边距 */
|
||||
color: #333333; /* 默认标题颜色 */
|
||||
}
|
||||
|
||||
|
@ -261,7 +349,7 @@ export default {
|
|||
.dashboard-card-group--month .dashboard-card-title {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 20px;
|
||||
margin-bottom: 16px;
|
||||
padding-left: 12px;
|
||||
position: relative;
|
||||
}
|
||||
|
@ -314,7 +402,7 @@ export default {
|
|||
.dashboard-card {
|
||||
flex: 1 1 240px;
|
||||
min-width: 220px;
|
||||
background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
|
||||
background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 1px 6px 0 rgba(253,160,133,0.12);
|
||||
padding: 18px 16px;
|
||||
|
@ -464,6 +552,520 @@ export default {
|
|||
/* padding-left: 你可能需要根据实际视觉效果计算一个值 */
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.dashboard-card-list {
|
||||
gap: 16px;
|
||||
}
|
||||
.dashboard-card, .dashboard-card--performance {
|
||||
min-width: unset;
|
||||
width: 100%;
|
||||
}
|
||||
.dashboard-card--performance .dashboard-card-value {
|
||||
font-size: 22px;
|
||||
}
|
||||
.dashboard-card--today.dashboard-card--performance .dashboard-card-value {
|
||||
font-size: 26px;
|
||||
}
|
||||
}
|
||||
|
||||
/* 特定会员卡片基础样式调整 */
|
||||
.dashboard-card--member {
|
||||
background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%); /* 淡紫色到淡蓝色渐变 */
|
||||
padding: 16px;
|
||||
justify-content: flex-start; /* 内容从顶部开始排列 */
|
||||
}
|
||||
|
||||
.dashboard-card--member .dashboard-card-header {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.dashboard-card--member .dashboard-card-label {
|
||||
color: #4a5568; /* 标签颜色变深一些 */
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.dashboard-card--member .dashboard-card-value {
|
||||
color: #2d3748; /* 数值颜色更深 */
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.dashboard-card-level-list {
|
||||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* 响应式列 */
|
||||
gap: 8px; /* 等级之间的间隙 */
|
||||
margin-top: 8px;
|
||||
padding: 8px;
|
||||
background-color: rgba(255, 255, 255, 0.2);
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.dashboard-card-level-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 4px 6px;
|
||||
font-size: 13px;
|
||||
background-color: rgba(255, 255, 255, 0.3);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.dashboard-card-level-item .level-name {
|
||||
color: #555;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.dashboard-card-level-item .level-count {
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
/* 当月会员卡片 - 最高优先级 */
|
||||
.dashboard-card--month-member {
|
||||
background: linear-gradient(135deg, #f6d365 0%, #fda085 100%); /* 恢复原有的橙色渐变,更醒目 */
|
||||
order: 1; /* 通过flex order调整顺序,如果父级是flex */
|
||||
/* 或者通过更强的视觉样式,如边框、阴影 */
|
||||
box-shadow: 0 6px 15px 0 rgba(253,160,133,0.3);
|
||||
transform: scale(1.02); /* 轻微放大 */
|
||||
}
|
||||
.dashboard-card--month-member .dashboard-card-label {
|
||||
color: #764d16;
|
||||
}
|
||||
.dashboard-card--month-member .dashboard-card-value {
|
||||
color: #c05621;
|
||||
font-size: 28px; /* 强调 */
|
||||
}
|
||||
.dashboard-card--month-member .dashboard-card-level-list {
|
||||
background-color: rgba(255, 235, 205, 0.3); /* 淡橙色背景 */
|
||||
}
|
||||
.dashboard-card--month-member .dashboard-card-level-item .level-name {
|
||||
color: #8c5a1e;
|
||||
}
|
||||
.dashboard-card--month-member .dashboard-card-level-item .level-count {
|
||||
color: #7b341e;
|
||||
}
|
||||
|
||||
/* 昨日会员卡片 - 中等优先级 */
|
||||
.dashboard-card--yesterday-member {
|
||||
background: linear-gradient(135deg, #a8d8ea 0%, #7ea7d8 100%); /* 清爽的蓝绿色渐变 */
|
||||
order: 2;
|
||||
box-shadow: 0 4px 10px 0 rgba(126,167,216,0.25);
|
||||
}
|
||||
.dashboard-card--yesterday-member .dashboard-card-label {
|
||||
color: #2c5282;
|
||||
}
|
||||
.dashboard-card--yesterday-member .dashboard-card-value {
|
||||
color: #1e3a8a;
|
||||
}
|
||||
.dashboard-card--yesterday-member .dashboard-card-level-list {
|
||||
background-color: rgba(200, 220, 240, 0.3);
|
||||
}
|
||||
|
||||
/* 今日会员卡片 - 普通优先级 */
|
||||
.dashboard-card--today-member {
|
||||
background: linear-gradient(135deg, #c3dae6 0%, #a4c1d2 100%); /* 柔和的灰蓝色 */
|
||||
order: 3;
|
||||
box-shadow: 0 2px 8px 0 rgba(164,193,210,0.2);
|
||||
}
|
||||
.dashboard-card--today-member .dashboard-card-label {
|
||||
color: #3a5068;
|
||||
}
|
||||
.dashboard-card--today-member .dashboard-card-value {
|
||||
color: #2a3f54;
|
||||
}
|
||||
|
||||
/* 移除旧的独立业绩卡片组和卡片样式 */
|
||||
.dashboard-card-group--performance-month,
|
||||
.dashboard-card-group--performance-yesterday,
|
||||
.dashboard-card-group--performance-today,
|
||||
.dashboard-card--month-performance,
|
||||
.dashboard-card--yesterday-performance,
|
||||
.dashboard-card--today-performance {
|
||||
/* 这些样式将被新的统一业绩模块样式取代 */
|
||||
/* 可以安全地注释或删除,这里暂时保留为空,方便对比 */
|
||||
}
|
||||
|
||||
/* 统一业绩总览模块样式 */
|
||||
.dashboard-card-group--performance-overview {
|
||||
background: #fff; /* 统一的白色背景,保持干净 */
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
|
||||
// padding: 24px 32px 24px 32px;
|
||||
order: 4; /* 确保在会员数据之后 */
|
||||
}
|
||||
|
||||
.performance-overview-container {
|
||||
display: flex;
|
||||
gap: 20px; /* 各业绩区块之间的间距 */
|
||||
flex-wrap: wrap; /* 允许换行,以适应不同屏幕 */
|
||||
}
|
||||
|
||||
.performance-section {
|
||||
flex: 1 1 300px; /* 基础弹性大小,允许增长和收缩,最小宽度300px */
|
||||
padding: 20px;
|
||||
border-radius: 10px;
|
||||
transition: all 0.3s ease-in-out;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 15px; /* 内部元素间距 */
|
||||
border: 1px solid #e5e7eb; /* 默认边框 */
|
||||
}
|
||||
|
||||
.performance-section:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 8px 20px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.performance-section-title {
|
||||
font-size: 17px;
|
||||
font-weight: 600;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 2px solid transparent; /* 默认透明,由具体区块设置颜色 */
|
||||
text-align: center;
|
||||
margin-bottom: 5px; /* 减少与下方总金额的间距 */
|
||||
}
|
||||
|
||||
.performance-summary-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: baseline; /* 金额与标签基线对齐 */
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid rgba(0,0,0,0.05); /* 保持细分隔线 */
|
||||
}
|
||||
|
||||
.performance-summary-label {
|
||||
font-size: 15px; /* 略微减小标签字号 */
|
||||
font-weight: 500; /* 降低字重 */
|
||||
color: #4a5568; /* 默认标签颜色,会被特定区块覆盖 */
|
||||
}
|
||||
|
||||
.performance-summary-value {
|
||||
font-size: 28px; /* 保持数值突出 */
|
||||
font-weight: bold;
|
||||
/* 颜色由各区块定义 */
|
||||
}
|
||||
|
||||
.performance-details-list {
|
||||
display: flex; /* 改为 flex 方便控制子项 */
|
||||
flex-direction: column; /* 垂直排列 */
|
||||
gap: 8px; /* 详情项之间的间距调整 */
|
||||
}
|
||||
|
||||
.performance-detail-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 6px 0px; /* 调整上下内边距,左右由父级或全局控制 */
|
||||
font-size: 14px;
|
||||
/* 移除背景色和圆角,使其更融入区块背景 */
|
||||
}
|
||||
|
||||
.performance-detail-item .detail-label {
|
||||
color: #666; /* 标签颜色调暗,使其不那么突出 */
|
||||
font-weight: 400; /* 普通字重 */
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.performance-detail-item .detail-value {
|
||||
/* color: #333; */ /* 颜色由各区块定义 */
|
||||
font-weight: 600; /* 稍加粗以突出数值 */
|
||||
font-size: 14.5px; /* 可略微增大数值字号 */
|
||||
}
|
||||
|
||||
/* 本月业绩区块 - 最高优先级 */
|
||||
.performance-section--month {
|
||||
order: 1; /* 在 performance-overview-container 内的顺序 */
|
||||
background: linear-gradient(135deg, #f3f9e6 0%, #e4f5d8 100%); /* 非常淡雅的绿色渐变 */
|
||||
border-color: #a3d9a5; /* 边框颜色与渐变协调 */
|
||||
box-shadow: 0 6px 15px rgba(163, 217, 165, 0.3);
|
||||
}
|
||||
.performance-section--month .performance-section-title {
|
||||
color: #38761d; /* 深绿色标题 */
|
||||
border-bottom-color: #6aa84f; /* 深绿色下划线 */
|
||||
}
|
||||
.performance-section--month .performance-summary-value {
|
||||
color: #2a5713; /* 更深的绿色数值 */
|
||||
font-size: 30px; /* 更大以突出 */
|
||||
}
|
||||
.performance-section--month .performance-summary-label {
|
||||
color: #4a7c37;
|
||||
}
|
||||
.performance-section--month .detail-label {
|
||||
color: #5a8c47;
|
||||
}
|
||||
.performance-section--month .detail-value {
|
||||
color: #2a5713;
|
||||
}
|
||||
.performance-section--month .performance-detail-item {
|
||||
/* background-color: rgba(163, 217, 165, 0.15); */ /* 移除独立背景 */
|
||||
border-bottom: 1px dashed rgba(106, 168, 79, 0.2); /* 添加虚线分隔 */
|
||||
}
|
||||
.performance-section--month .performance-detail-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/* 昨日业绩区块 - 中等优先级 */
|
||||
.performance-section--yesterday {
|
||||
order: 2;
|
||||
background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%); /* 非常淡雅的黄色渐变 */
|
||||
border-color: #ffd54f; /* 边框颜色 */
|
||||
box-shadow: 0 4px 12px rgba(255, 213, 79, 0.25);
|
||||
}
|
||||
.performance-section--yesterday .performance-section-title {
|
||||
color: #b06000; /* 深黄色/橙色标题 */
|
||||
border-bottom-color: #f59e0b;
|
||||
}
|
||||
.performance-section--yesterday .performance-summary-value {
|
||||
color: #8c4d00;
|
||||
font-size: 28px;
|
||||
}
|
||||
.performance-section--yesterday .performance-summary-label {
|
||||
color: #b06000;
|
||||
}
|
||||
.performance-section--yesterday .detail-label {
|
||||
color: #c87000;
|
||||
}
|
||||
.performance-section--yesterday .detail-value {
|
||||
color: #8c4d00;
|
||||
}
|
||||
.performance-section--yesterday .performance-detail-item {
|
||||
/* background-color: rgba(255, 213, 79, 0.15); */
|
||||
border-bottom: 1px dashed rgba(245, 158, 11, 0.25);
|
||||
}
|
||||
.performance-section--yesterday .performance-detail-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/* 今日业绩区块 - 普通优先级 */
|
||||
.performance-section--today {
|
||||
order: 3;
|
||||
background: linear-gradient(135deg, #e3f2fd 0%, #d0e7fa 100%); /* 非常淡雅的蓝色渐变 */
|
||||
border-color: #90caf9; /* 边框颜色 */
|
||||
box-shadow: 0 3px 10px rgba(144, 202, 249, 0.2);
|
||||
}
|
||||
.performance-section--today .performance-section-title {
|
||||
color: #1e3a8a; /* 深蓝色标题 */
|
||||
border-bottom-color: #357ae8;
|
||||
}
|
||||
.performance-section--today .performance-summary-value {
|
||||
color: #1a2c5c;
|
||||
font-size: 26px; /* 今日数值略小一点 */
|
||||
}
|
||||
.performance-section--today .performance-summary-label {
|
||||
color: #2c5282; /* 为今日业绩标签设置颜色 */
|
||||
}
|
||||
.performance-section--today .detail-label {
|
||||
color: #357ae8; /* 为今日业绩详情标签设置颜色 */
|
||||
}
|
||||
.performance-section--today .detail-value {
|
||||
color: #1e3a8a; /* 为今日业绩详情数值设置颜色 */
|
||||
}
|
||||
.performance-section--today .performance-detail-item {
|
||||
/* background-color: rgba(144, 202, 249, 0.15); */
|
||||
border-bottom: 1px dashed rgba(53, 122, 232, 0.25);
|
||||
}
|
||||
.performance-section--today .performance-detail-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/* 确保 .dashboard-cards 是 flex 容器以使 order 生效 */
|
||||
.dashboard-cards {
|
||||
display: flex;
|
||||
flex-direction: column; /* 保持现有的列布局 */
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.dashboard-card-list {
|
||||
gap: 16px;
|
||||
}
|
||||
.dashboard-card, .dashboard-card--performance {
|
||||
min-width: unset;
|
||||
width: 100%;
|
||||
}
|
||||
.dashboard-card--performance .dashboard-card-value {
|
||||
font-size: 22px;
|
||||
}
|
||||
.dashboard-card--today.dashboard-card--performance .dashboard-card-value {
|
||||
font-size: 26px;
|
||||
}
|
||||
}
|
||||
|
||||
/* 充值汇总模块样式 */
|
||||
.dashboard-card-group--recharge-summary {
|
||||
/* order 属性确保其在业绩总览之后,如果需要调整顺序,修改这里的 order 值 */
|
||||
order: 5;
|
||||
/* 其余基础样式(背景、padding、圆角、阴影)应继承自 .dashboard-card-group */
|
||||
/* 如果需要特定调整,可以在这里覆盖,例如:*/
|
||||
/* background: #fcfcff; */ /* 一个非常浅的背景色以作区分 */
|
||||
}
|
||||
|
||||
.recharge-summary-container {
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.recharge-section {
|
||||
flex: 1 1 300px;
|
||||
padding: 20px;
|
||||
border-radius: 10px;
|
||||
transition: all 0.3s ease-in-out;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 15px;
|
||||
border: 1px solid #e0e0e0; /* 默认边框 */
|
||||
position: relative; /* 为内部绝对定位元素做准备,如果需要 */
|
||||
/* background-clip: padding-box; */ /* 确保背景和边框在padding区域内 */
|
||||
}
|
||||
|
||||
.recharge-section:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 10px 25px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.recharge-section-title {
|
||||
font-size: 18px; /* 略微增大标题 */
|
||||
font-weight: 600;
|
||||
padding: 8px 15px; /* 调整标题内边距 */
|
||||
border-bottom: none; /* 移除之前的下划线,采用背景色块 */
|
||||
text-align: center;
|
||||
margin-bottom: 10px; /* 调整与列表的间距 */
|
||||
border-radius: 6px 6px 0 0; /* 配合背景色块,给顶部圆角 */
|
||||
color: #fff; /* 标题文字统一用白色,依赖背景色区分 */
|
||||
}
|
||||
|
||||
.recharge-account-list {
|
||||
list-style: none;
|
||||
padding: 0 5px; /* 给列表左右一点空间,避免贴边 */
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px; /* 账户项之间的间距 */
|
||||
}
|
||||
|
||||
.recharge-account-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 10px 15px; /* 增加列表项内边距 */
|
||||
border-radius: 6px;
|
||||
font-size: 14px;
|
||||
transition: background-color 0.2s ease, transform 0.2s ease;
|
||||
border-left: 4px solid transparent; /* 预留左边框位置 */
|
||||
background-color: rgba(255,255,255,0.4); /* 非常淡的白色背景,使其略微突出于区块背景 */
|
||||
}
|
||||
|
||||
.recharge-account-item:hover {
|
||||
background-color: rgba(255,255,255,0.7);
|
||||
transform: translateX(3px);
|
||||
}
|
||||
|
||||
.recharge-account-item .account-name {
|
||||
/* color: #555; */ /* 颜色由各区块定义 */
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.recharge-account-item .account-amount {
|
||||
/* color: #333; */ /* 颜色由各区块定义 */
|
||||
font-weight: bold;
|
||||
font-size: 14.5px; /* 金额字体可稍大 */
|
||||
}
|
||||
|
||||
.no-data-placeholder {
|
||||
text-align: center;
|
||||
color: #999;
|
||||
padding: 20px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* 本月充值区块 - 最高优先级 */
|
||||
.recharge-section--month {
|
||||
order: 1; /* 在 recharge-summary-container 内的顺序 */
|
||||
background: linear-gradient(135deg, #f6eafd 0%, #e9dffc 100%); /* 更淡雅的紫色渐变 */
|
||||
border-color: #d1bcf3;
|
||||
box-shadow: 0 6px 18px rgba(209, 188, 243, 0.35);
|
||||
}
|
||||
.recharge-section--month .recharge-section-title {
|
||||
background-color: #7e57c2; /* 深紫色标题背景 */
|
||||
/* color: #fff; 已在通用设置 */
|
||||
}
|
||||
.recharge-section--month .recharge-account-item {
|
||||
border-left-color: #7e57c2;
|
||||
}
|
||||
.recharge-section--month .account-name {
|
||||
color: #673ab7;
|
||||
}
|
||||
.recharge-section--month .account-amount {
|
||||
color: #4527a0;
|
||||
font-size: 15px; /* 强调金额 */
|
||||
}
|
||||
.recharge-section--month .recharge-account-item:hover {
|
||||
background-color: rgba(126, 87, 194, 0.15);
|
||||
border-left-color: #5e35b1; /* hover时边框加深 */
|
||||
}
|
||||
|
||||
/* 昨日充值区块 - 中等优先级 */
|
||||
.recharge-section--yesterday {
|
||||
order: 2;
|
||||
background: linear-gradient(135deg, #e0f7fa 0%, #cbeef6 100%); /* 更淡雅的青色渐变 */
|
||||
border-color: #a0e1eb;
|
||||
box-shadow: 0 4px 15px rgba(160, 225, 235, 0.3);
|
||||
}
|
||||
.recharge-section--yesterday .recharge-section-title {
|
||||
background-color: #00897b; /* 深青色标题背景 */
|
||||
}
|
||||
.recharge-section--yesterday .recharge-account-item {
|
||||
border-left-color: #00897b;
|
||||
}
|
||||
.recharge-section--yesterday .account-name {
|
||||
color: #00897b;
|
||||
}
|
||||
.recharge-section--yesterday .account-amount {
|
||||
color: #00695c;
|
||||
}
|
||||
.recharge-section--yesterday .recharge-account-item:hover {
|
||||
background-color: rgba(0, 137, 123, 0.12);
|
||||
border-left-color: #00796b;
|
||||
}
|
||||
|
||||
/* 今日充值区块 - 普通优先级 */
|
||||
.recharge-section--today {
|
||||
order: 3;
|
||||
background: linear-gradient(135deg, #e6f4e7 0%, #d8ebd9 100%); /* 非常淡的灰绿色 */
|
||||
border-color: #b2dfdb;
|
||||
box-shadow: 0 3px 12px rgba(178, 223, 219, 0.25);
|
||||
}
|
||||
.recharge-section--today .recharge-section-title {
|
||||
background-color: #388e3c; /* 绿色标题背景 */
|
||||
}
|
||||
.recharge-section--today .recharge-account-item {
|
||||
border-left-color: #388e3c;
|
||||
}
|
||||
.recharge-section--today .account-name {
|
||||
color: #388e3c;
|
||||
}
|
||||
.recharge-section--today .account-amount {
|
||||
color: #1b5e20;
|
||||
}
|
||||
.recharge-section--today .recharge-account-item:hover {
|
||||
background-color: rgba(56, 142, 60, 0.1);
|
||||
border-left-color: #2e7d32;
|
||||
}
|
||||
|
||||
/* 确保 .dashboard-cards 是 flex 容器以使 order 生效 */
|
||||
.dashboard-cards {
|
||||
display: flex;
|
||||
flex-direction: column; /* 保持现有的列布局 */
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.dashboard-card-list {
|
||||
gap: 16px;
|
||||
|
|
Loading…
Reference in New Issue