feat(listing): 调整商品管理资产与价格列
This commit is contained in:
@@ -60,18 +60,19 @@ const listingTableWidth = ref(1296)
|
|||||||
const activeFilterPopover = ref<FilterPopover | ''>('')
|
const activeFilterPopover = ref<FilterPopover | ''>('')
|
||||||
const publishOptions = ref(emptyListingPublishOptions)
|
const publishOptions = ref(emptyListingPublishOptions)
|
||||||
const listingColumnUnits = {
|
const listingColumnUnits = {
|
||||||
code: 70,
|
code: 68,
|
||||||
zone: 75,
|
zone: 70,
|
||||||
region: 105,
|
region: 100,
|
||||||
core: 85,
|
core: 80,
|
||||||
level: 60,
|
level: 58,
|
||||||
equipment: 80,
|
equipment: 78,
|
||||||
skin: 145,
|
skin: 135,
|
||||||
face: 60,
|
face: 58,
|
||||||
remark: 85,
|
remark: 80,
|
||||||
price: 100,
|
purePrice: 72,
|
||||||
period: 55,
|
period: 50,
|
||||||
ratio: 35,
|
rentDeposit: 76,
|
||||||
|
ratio: 30,
|
||||||
detail: 45,
|
detail: 45,
|
||||||
} as const
|
} as const
|
||||||
type ListingColumnKey = keyof typeof listingColumnUnits
|
type ListingColumnKey = keyof typeof listingColumnUnits
|
||||||
@@ -153,39 +154,36 @@ const skinFilterLabel = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const screenshotColumns = [
|
const screenshotColumns = [
|
||||||
{ label: '商品编码', width: 98, read: (row: Listing) => formatListingCode(row) },
|
{ label: '商品编码', width: 95, read: (row: Listing) => formatListingCode(row) },
|
||||||
{
|
{
|
||||||
label: '专区/赔付',
|
label: '专区/赔付',
|
||||||
width: 105,
|
width: 98,
|
||||||
read: (row: Listing) => zoneCompensationText(row),
|
read: (row: Listing) => zoneCompensationText(row),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '地区/上号/纯币',
|
label: '地区/上号/纯币',
|
||||||
width: 147,
|
width: 140,
|
||||||
read: (row: Listing) => regionLoginCoinText(row),
|
read: (row: Listing) => regionLoginCoinText(row),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '体力/负重/保险',
|
label: '保险/体力/负重',
|
||||||
width: 119,
|
width: 112,
|
||||||
read: (row: Listing) => coreAssetText(row),
|
read: (row: Listing) => coreAssetText(row),
|
||||||
},
|
},
|
||||||
{ label: '等级/KD', width: 84, read: (row: Listing) => levelKdText(row) },
|
{ label: '等级/KD', width: 81, read: (row: Listing) => levelKdText(row) },
|
||||||
{
|
{
|
||||||
label: 'AWM/六头/六甲',
|
label: 'AWM/六头/六甲',
|
||||||
width: 112,
|
width: 109,
|
||||||
read: (row: Listing) => equipmentText(row),
|
read: (row: Listing) => equipmentText(row),
|
||||||
},
|
},
|
||||||
{ label: '皮肤资产', width: 203, read: (row: Listing) => skinAssetText(row) },
|
{ label: '皮肤资产', width: 189, read: (row: Listing) => skinAssetText(row) },
|
||||||
{ label: '人脸/全英雄', width: 84, read: (row: Listing) => faceHeroText(row) },
|
{ label: '人脸/全英雄', width: 81, read: (row: Listing) => faceHeroText(row) },
|
||||||
{ label: '号主备注', width: 119, read: (row: Listing) => ownerRemarkText(row) },
|
{ label: '号主备注', width: 112, read: (row: Listing) => ownerRemarkText(row) },
|
||||||
{
|
{ label: '租客纯币价格', width: 101, read: (row: Listing) => renterPureCoinPriceText(row) },
|
||||||
label: '纯币/租金/押金',
|
{ label: '租期', width: 70, read: (row: Listing) => rentalPeriodText(row) },
|
||||||
width: 140,
|
{ label: '租金/押金', width: 106, read: (row: Listing) => rentAndDepositText(row) },
|
||||||
read: (row: Listing) => priceRentDepositText(row),
|
{ label: '比例', width: 42, read: (row: Listing) => formatRatio(row) },
|
||||||
},
|
{ label: '详情', width: 64, read: () => '详情' },
|
||||||
{ label: '租期', width: 77, read: (row: Listing) => rentalPeriodText(row) },
|
|
||||||
{ label: '比例', width: 49, read: (row: Listing) => formatRatio(row) },
|
|
||||||
{ label: '详情', width: 63, read: () => '详情' },
|
|
||||||
] as const
|
] as const
|
||||||
|
|
||||||
async function queryListings() {
|
async function queryListings() {
|
||||||
@@ -661,9 +659,9 @@ function insuranceSlotText(row: Listing) {
|
|||||||
|
|
||||||
function coreAssetText(row: Listing) {
|
function coreAssetText(row: Listing) {
|
||||||
return [
|
return [
|
||||||
|
insuranceSlotText(row),
|
||||||
levelText(row, 'stamina_level'),
|
levelText(row, 'stamina_level'),
|
||||||
levelText(row, 'load_level'),
|
levelText(row, 'load_level'),
|
||||||
insuranceSlotText(row),
|
|
||||||
].join('/')
|
].join('/')
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -672,7 +670,7 @@ function coreAssetTitle(row: Listing) {
|
|||||||
const slots = insurance === '-' ? '-' : insuranceSlotLabel(insurance)
|
const slots = insurance === '-' ? '-' : insuranceSlotLabel(insurance)
|
||||||
const insuranceText =
|
const insuranceText =
|
||||||
insurance === '-' || slots === insurance ? insurance : `${insurance}=${slots}格`
|
insurance === '-' || slots === insurance ? insurance : `${insurance}=${slots}格`
|
||||||
return `体力 ${levelText(row, 'stamina_level')} / 负重 ${levelText(row, 'load_level')} / 保险 ${insuranceText}`
|
return `保险 ${insuranceText} / 体力 ${levelText(row, 'stamina_level')} / 负重 ${levelText(row, 'load_level')}`
|
||||||
}
|
}
|
||||||
|
|
||||||
function levelKdText(row: Listing) {
|
function levelKdText(row: Listing) {
|
||||||
@@ -717,14 +715,6 @@ function faceHeroText(row: Listing) {
|
|||||||
return [faceOwnerText(row), allHeroText(row)].join('/')
|
return [faceOwnerText(row), allHeroText(row)].join('/')
|
||||||
}
|
}
|
||||||
|
|
||||||
function priceRentDepositText(row: Listing) {
|
|
||||||
return [
|
|
||||||
renterPureCoinPriceText(row),
|
|
||||||
listingPrice(row),
|
|
||||||
formatCentWithSymbol(row.deposit_amount_cent),
|
|
||||||
].join('\n')
|
|
||||||
}
|
|
||||||
|
|
||||||
function ownerRemarkText(row: Listing) {
|
function ownerRemarkText(row: Listing) {
|
||||||
const remark = row.description?.trim()
|
const remark = row.description?.trim()
|
||||||
return remark || '-'
|
return remark || '-'
|
||||||
@@ -747,6 +737,10 @@ function renterPureCoinPriceText(row: Listing) {
|
|||||||
return formatCentWithSymbol(Math.round(price * 100))
|
return formatCentWithSymbol(Math.round(price * 100))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function rentAndDepositText(row: Listing) {
|
||||||
|
return `${listingPrice(row)}/${formatCentWithSymbol(row.deposit_amount_cent)}`
|
||||||
|
}
|
||||||
|
|
||||||
function estimateTitle(row: Listing) {
|
function estimateTitle(row: Listing) {
|
||||||
const dailyLoss = getDailyLoss(row)
|
const dailyLoss = getDailyLoss(row)
|
||||||
return dailyLoss ? `按哈夫币 ${listingCoinM(row)}、日耗 ${dailyLoss} 估算` : '未配置日耗'
|
return dailyLoss ? `按哈夫币 ${listingCoinM(row)}、日耗 ${dailyLoss} 估算` : '未配置日耗'
|
||||||
@@ -1086,7 +1080,7 @@ function formatQuantity(value: number) {
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="体力/负重/保险"
|
label="保险/体力/负重"
|
||||||
:width="listingColumnWidths.core"
|
:width="listingColumnWidths.core"
|
||||||
label-class-name="listing-merged-header"
|
label-class-name="listing-merged-header"
|
||||||
>
|
>
|
||||||
@@ -1136,13 +1130,11 @@ function formatQuantity(value: number) {
|
|||||||
<el-table-column label="号主备注" :width="listingColumnWidths.remark" show-overflow-tooltip>
|
<el-table-column label="号主备注" :width="listingColumnWidths.remark" show-overflow-tooltip>
|
||||||
<template #default="{ row }">{{ ownerRemarkText(row) }}</template>
|
<template #default="{ row }">{{ ownerRemarkText(row) }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column label="租客纯币价格" :width="listingColumnWidths.purePrice">
|
||||||
label="纯币/租金/押金"
|
|
||||||
:width="listingColumnWidths.price"
|
|
||||||
label-class-name="listing-merged-header"
|
|
||||||
>
|
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<span class="listing-multiline-cell">{{ priceRentDepositText(row) }}</span>
|
<span :title="`租客纯币价格(不含消耗品)${renterPureCoinPriceText(row)}`">
|
||||||
|
{{ renterPureCoinPriceText(row) }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="租期" :width="listingColumnWidths.period">
|
<el-table-column label="租期" :width="listingColumnWidths.period">
|
||||||
@@ -1151,6 +1143,9 @@ function formatQuantity(value: number) {
|
|||||||
<span v-if="getDailyLoss(row)" class="table-subtext">日耗 {{ getDailyLoss(row) }}</span>
|
<span v-if="getDailyLoss(row)" class="table-subtext">日耗 {{ getDailyLoss(row) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="租金/押金" :width="listingColumnWidths.rentDeposit">
|
||||||
|
<template #default="{ row }">{{ rentAndDepositText(row) }}</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="比例" :width="listingColumnWidths.ratio">
|
<el-table-column label="比例" :width="listingColumnWidths.ratio">
|
||||||
<template #default="{ row }">{{ formatRatio(row) }}</template>
|
<template #default="{ row }">{{ formatRatio(row) }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|||||||
Reference in New Issue
Block a user