feat(admin-listings): 优化商品管理表格纯币价格展示与租期列位置
1. 将原“纯币价格(号主)”调整为“租客纯币价格”,底层取值切换为租客纯币计算(getListingRentPrice),适配列宽与悬浮提示; 2. 调整表格列顺序,将“租期”列移动至“租客纯币价格”与“租金/押金”中间; 3. 同步调整表格图片导出/截图配置(screenshotColumns)的列名与排序,保持视图与导出一致。
This commit is contained in:
@@ -22,7 +22,7 @@ import {
|
||||
formatRatio,
|
||||
getCoinWan,
|
||||
getDailyLoss,
|
||||
getListingSellerCoinPrice,
|
||||
getListingRentPrice,
|
||||
getResourceQuantity,
|
||||
getSkinGroup,
|
||||
} from '@/shared/utils/listingDisplay'
|
||||
@@ -136,14 +136,14 @@ const screenshotColumns = [
|
||||
read: (row: Listing) => characterAndWeaponSkinText(row),
|
||||
},
|
||||
{ label: '号主备注', width: 160, read: (row: Listing) => ownerRemarkText(row) },
|
||||
{ label: '纯币价格', width: 90, read: (row: Listing) => ownerPureCoinPriceText(row) },
|
||||
{ label: '租金/押金', width: 96, read: (row: Listing) => rentAndDepositText(row) },
|
||||
{ label: '比例', width: 64, read: (row: Listing) => formatRatio(row) },
|
||||
{ label: '租客纯币价格', width: 105, read: (row: Listing) => renterPureCoinPriceText(row) },
|
||||
{
|
||||
label: '租期',
|
||||
width: 92,
|
||||
read: (row: Listing) => rentalPeriodText(row),
|
||||
},
|
||||
{ label: '租金/押金', width: 96, read: (row: Listing) => rentAndDepositText(row) },
|
||||
{ label: '比例', width: 64, read: (row: Listing) => formatRatio(row) },
|
||||
] as const
|
||||
|
||||
async function queryListings() {
|
||||
@@ -601,9 +601,9 @@ function rentAndDepositText(row: Listing) {
|
||||
return `${listingPrice(row)}/${formatCentWithSymbol(row.deposit_amount_cent)}`
|
||||
}
|
||||
|
||||
// 号主纯币价格:号主收号价里的纯币部分(不含额外消耗品),取自发布时固化的价格快照。
|
||||
function ownerPureCoinPriceText(row: Listing) {
|
||||
const price = getListingSellerCoinPrice(row)
|
||||
// 租客纯币价格:不含额外消耗品的纯币部分(快照 buyer_coin_base_price 或 总价减消耗品)。
|
||||
function renterPureCoinPriceText(row: Listing) {
|
||||
const price = getListingRentPrice(row)
|
||||
if (price <= 0) return '-'
|
||||
return formatCentWithSymbol(Math.round(price * 100))
|
||||
}
|
||||
@@ -974,26 +974,25 @@ function formatQuantity(value: number) {
|
||||
<el-table-column label="号主备注" min-width="150">
|
||||
<template #default="{ row }">{{ ownerRemarkText(row) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="纯币价格" width="90">
|
||||
<el-table-column label="租客纯币价格" width="105">
|
||||
<template #default="{ row }">
|
||||
<span :title="`号主纯币价格(不含消耗品)${ownerPureCoinPriceText(row)}`">
|
||||
{{ ownerPureCoinPriceText(row) }}
|
||||
<span :title="`租客纯币价格(不含消耗品)${renterPureCoinPriceText(row)}`">
|
||||
{{ renterPureCoinPriceText(row) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="租金/押金" width="90">
|
||||
<template #default="{ row }">{{ rentAndDepositText(row) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="比例" width="62">
|
||||
<template #default="{ row }">{{ formatRatio(row) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="租期" width="82">
|
||||
<template #default="{ row }">
|
||||
<span :title="estimateTitle(row)">{{ formatEstimatedRentalDuration(row) }}</span>
|
||||
<span v-if="getDailyLoss(row)" class="table-subtext">日耗 {{ getDailyLoss(row) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="租金/押金" width="90">
|
||||
<template #default="{ row }">{{ rentAndDepositText(row) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="比例" width="62">
|
||||
<template #default="{ row }">{{ formatRatio(row) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="详情" width="60">
|
||||
<template #default="{ row }">
|
||||
<RouterLink :to="adminPath(`listings/${row.id}`)">
|
||||
|
||||
Reference in New Issue
Block a user