实现租客成长等级并优化展示
This commit is contained in:
@@ -13,6 +13,9 @@ export interface AdminUserItem {
|
||||
deposit_free_quota_cent: number
|
||||
deposit_free_used_cent: number
|
||||
deposit_free_remaining_cent: number
|
||||
renter_growth_points: number
|
||||
renter_growth_level: string
|
||||
renter_growth_level_name: string
|
||||
available_balance_cent: number
|
||||
frozen_balance_cent: number
|
||||
status: UserStatus
|
||||
|
||||
@@ -266,7 +266,17 @@ const ownerLossPriceCent = computed(() => {
|
||||
const hasOwnerRentBreakdown = computed(() => ownerCoinBasePriceCent.value !== null)
|
||||
const fundSplitRows = computed(() => {
|
||||
if (!order.value) return []
|
||||
const rows: FundSplitRow[] = [{ label: '租客租金', amountCent: order.value.rent_amount_cent }]
|
||||
const rows: FundSplitRow[] = []
|
||||
if (Number(order.value.rent_discount_amount_cent || 0) > 0) {
|
||||
rows.push(
|
||||
{ label: '原始租金', amountCent: order.value.rent_original_amount_cent },
|
||||
{
|
||||
label: `${order.value.renter_growth_level_name || '成长等级'}优惠`,
|
||||
amountCent: -Number(order.value.rent_discount_amount_cent || 0),
|
||||
}
|
||||
)
|
||||
}
|
||||
rows.push({ label: '租客租金', amountCent: order.value.rent_amount_cent })
|
||||
if (hasOwnerRentBreakdown.value) {
|
||||
rows.push(
|
||||
{ label: '号主纯币价格', amountCent: ownerCoinBasePriceCent.value },
|
||||
@@ -843,7 +853,12 @@ function paymentPaidAt(record: AdminPayment) {
|
||||
<el-button v-if="canResetHandoff" type="success" @click="openAction('reset')">
|
||||
{{ resetActionLabel }}
|
||||
</el-button>
|
||||
<el-button v-if="canPlatformHandoff" type="primary" plain @click="openPlatformHandoff">
|
||||
<el-button
|
||||
v-if="canPlatformHandoff"
|
||||
class="platform-handoff-button"
|
||||
type="primary"
|
||||
@click="openPlatformHandoff"
|
||||
>
|
||||
{{ platformHandoffAction?.label || '客服代交接' }}
|
||||
</el-button>
|
||||
<el-button
|
||||
@@ -1551,6 +1566,27 @@ function paymentPaidAt(record: AdminPayment) {
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.platform-handoff-button {
|
||||
min-width: 96px;
|
||||
border-color: #2563eb;
|
||||
background: #2563eb;
|
||||
color: #ffffff;
|
||||
font-weight: 700;
|
||||
box-shadow: 0 6px 14px rgba(37, 99, 235, 0.18);
|
||||
}
|
||||
|
||||
.platform-handoff-button:hover,
|
||||
.platform-handoff-button:focus {
|
||||
border-color: #1d4ed8;
|
||||
background: #1d4ed8;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.platform-handoff-button:active {
|
||||
border-color: #1e40af;
|
||||
background: #1e40af;
|
||||
}
|
||||
|
||||
.order-detail-grid {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
|
||||
|
||||
@@ -312,6 +312,14 @@ function moneyCent(value: number | string | undefined) {
|
||||
<el-table-column label="实名状态" width="100">
|
||||
<template #default="{ row }">{{ realnameStatusLabel(row.realname_status) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="成长等级" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-tag type="success" effect="light">{{ row.renter_growth_level_name || '普通' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="成长积分" width="100" align="right">
|
||||
<template #default="{ row }">{{ Number(row.renter_growth_points || 0) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="可用余额" width="108" align="right">
|
||||
<template #default="{ row }">
|
||||
<span class="balance-available">¥{{ moneyCent(row.available_balance_cent) }}</span>
|
||||
|
||||
Reference in New Issue
Block a user