feat(listing): 商品列表展示来源商行
This commit is contained in:
@@ -60,21 +60,22 @@ const listingTableWidth = ref(1296)
|
||||
const activeFilterPopover = ref<FilterPopover | ''>('')
|
||||
const publishOptions = ref(emptyListingPublishOptions)
|
||||
const listingColumnUnits = {
|
||||
code: 68,
|
||||
zone: 70,
|
||||
region: 62,
|
||||
login: 38,
|
||||
core: 80,
|
||||
level: 58,
|
||||
equipment: 78,
|
||||
skin: 135,
|
||||
face: 58,
|
||||
remark: 80,
|
||||
purePrice: 72,
|
||||
period: 50,
|
||||
rentDeposit: 76,
|
||||
ratio: 30,
|
||||
detail: 45,
|
||||
merchant: 62,
|
||||
code: 62,
|
||||
zone: 64,
|
||||
region: 58,
|
||||
login: 36,
|
||||
core: 74,
|
||||
level: 52,
|
||||
equipment: 72,
|
||||
skin: 128,
|
||||
face: 52,
|
||||
remark: 72,
|
||||
purePrice: 68,
|
||||
period: 46,
|
||||
rentDeposit: 72,
|
||||
ratio: 28,
|
||||
detail: 44,
|
||||
} as const
|
||||
type ListingColumnKey = keyof typeof listingColumnUnits
|
||||
const listingColumnWidths = computed(() => allocateListingColumnWidths(listingTableWidth.value))
|
||||
@@ -155,6 +156,7 @@ const skinFilterLabel = computed(() => {
|
||||
})
|
||||
|
||||
const screenshotColumns = [
|
||||
{ label: '商行', width: 76, read: (row: Listing) => sourceMerchantText(row) },
|
||||
{ label: '商品编码', width: 95, read: (row: Listing) => formatListingCode(row) },
|
||||
{
|
||||
label: '专区/赔付',
|
||||
@@ -625,6 +627,10 @@ function listingCoinM(row: Listing) {
|
||||
return formatHafCoinM(getCoinWan(row))
|
||||
}
|
||||
|
||||
function sourceMerchantText(row: Listing) {
|
||||
return row.source_merchant_name?.trim() || '-'
|
||||
}
|
||||
|
||||
function assetText(row: Listing, key: string) {
|
||||
const value = row.asset_summary?.[key]
|
||||
if (typeof value === 'number') return formatQuantity(value)
|
||||
@@ -1055,6 +1061,13 @@ function formatQuantity(value: number) {
|
||||
stripe
|
||||
empty-text="暂无商品"
|
||||
>
|
||||
<el-table-column label="商行" :width="listingColumnWidths.merchant">
|
||||
<template #default="{ row }">
|
||||
<span class="listing-merchant" :title="sourceMerchantText(row)">
|
||||
{{ sourceMerchantText(row) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品编码" :width="listingColumnWidths.code">
|
||||
<template #default="{ row }">
|
||||
<strong class="listing-code">{{ formatListingCode(row) }}</strong>
|
||||
|
||||
@@ -12,6 +12,7 @@ export interface Listing {
|
||||
owner_nickname?: string
|
||||
owner_is_quality_owner?: boolean
|
||||
source_channel?: string
|
||||
source_merchant_name?: string
|
||||
is_external_upload?: boolean
|
||||
title: string
|
||||
description: string
|
||||
|
||||
@@ -1177,6 +1177,17 @@ h1 {
|
||||
word-break: keep-all;
|
||||
}
|
||||
|
||||
.admin-listings-table .listing-merchant {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
font-size: 11px;
|
||||
line-height: 1.2;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
word-break: keep-all;
|
||||
}
|
||||
|
||||
.admin-listings-table .face-owner-no {
|
||||
color: #dc2626;
|
||||
font-weight: 700;
|
||||
|
||||
Reference in New Issue
Block a user