fix(tenant): 收紧双站运营提号与录单边界
This commit is contained in:
@@ -10,6 +10,13 @@ export type AvailableListingSourceType = '' | 'external' | 'internal'
|
||||
|
||||
export interface AdminPickup {
|
||||
id: number
|
||||
tenant_id: number
|
||||
tenant_code: string
|
||||
tenant_name: string
|
||||
source_tenant_id: number
|
||||
source_tenant_code: string
|
||||
source_tenant_name: string
|
||||
is_cross_tenant: boolean
|
||||
pickup_no: string
|
||||
listing_id: number
|
||||
listing_no: string
|
||||
@@ -91,6 +98,10 @@ export interface AdminPickupProcessEvent {
|
||||
|
||||
export interface AvailableListing {
|
||||
id: number
|
||||
source_tenant_id: number
|
||||
source_tenant_code: string
|
||||
source_tenant_name: string
|
||||
is_cross_tenant: boolean
|
||||
listing_no: string
|
||||
account_id: number
|
||||
account_title: string
|
||||
|
||||
@@ -51,7 +51,9 @@ const voucherUploading = ref(false)
|
||||
const manualActionID = ref(0)
|
||||
const selectedManual = ref<FinanceDisbursementItem | null>(null)
|
||||
const summary = ref<FinanceDisbursementListSummary>(emptySummary())
|
||||
const canManageManual = computed(() => adminSession.hasPermission('finance:manual_disbursement'))
|
||||
const canManageManual = computed(
|
||||
() => adminSession.isSuperAdmin && adminSession.hasPermission('finance:manual_disbursement')
|
||||
)
|
||||
|
||||
const manualCategories = [
|
||||
{ value: 'user_compensation', label: '用户补偿' },
|
||||
|
||||
@@ -41,7 +41,9 @@ const total = ref(0)
|
||||
const currentPage = ref(1)
|
||||
const currentPageSize = ref(20)
|
||||
const summary = ref<OperatingExpenseListSummary>(emptySummary())
|
||||
const canManage = computed(() => adminSession.hasPermission('finance:operating_expense'))
|
||||
const canManage = computed(
|
||||
() => adminSession.isSuperAdmin && adminSession.hasPermission('finance:operating_expense')
|
||||
)
|
||||
|
||||
const filters = reactive({
|
||||
date_type: 'created' as 'created' | 'occurred',
|
||||
|
||||
@@ -462,6 +462,19 @@ function readSnapshotResources(summary: Record<string, unknown> | null): Snapsho
|
||||
<dt>提号编号</dt>
|
||||
<dd>{{ pickup.pickup_no }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>提号站点</dt>
|
||||
<dd>{{ pickup.tenant_name || pickup.tenant_code || '-' }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>货源站点</dt>
|
||||
<dd>
|
||||
{{ pickup.source_tenant_name || pickup.source_tenant_code || '-' }}
|
||||
<el-tag v-if="pickup.is_cross_tenant" type="warning" size="small" effect="light">
|
||||
跨站提号
|
||||
</el-tag>
|
||||
</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>上架编号</dt>
|
||||
<dd>{{ listingCode }}</dd>
|
||||
|
||||
@@ -604,8 +604,22 @@ function listingSourceText(item: AvailableListing) {
|
||||
return item.source_channel ? `${label} · ${item.source_channel}` : label
|
||||
}
|
||||
|
||||
function siteName(code: string, name: string) {
|
||||
return name || code || '未配置站点'
|
||||
}
|
||||
|
||||
function pickupSiteText(row: AdminPickup) {
|
||||
if (!row.is_cross_tenant) return '本站货源'
|
||||
return `跨站 · ${siteName(row.source_tenant_code, row.source_tenant_name)}`
|
||||
}
|
||||
|
||||
function listingSiteText(item: AvailableListing) {
|
||||
const source = siteName(item.source_tenant_code, item.source_tenant_name)
|
||||
return item.is_cross_tenant ? `跨站 · ${source}` : `本站 · ${source}`
|
||||
}
|
||||
|
||||
function listingOptionLabel(item: AvailableListing) {
|
||||
return `${listingSourceText(item)} · ${item.listing_no} · ${item.account_title} · ${formatCentWithSymbol(listingOwnerTotalCent(item))} / ${formatCentWithSymbol(item.listing_price_cent)}`
|
||||
return `${listingSiteText(item)} · ${listingSourceText(item)} · ${item.listing_no} · ${item.account_title} · ${formatCentWithSymbol(listingOwnerTotalCent(item))} / ${formatCentWithSymbol(item.listing_price_cent)}`
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -615,7 +629,7 @@ function listingOptionLabel(item: AvailableListing) {
|
||||
<div class="page-header">
|
||||
<p class="eyebrow">Admin Pickup</p>
|
||||
<h1>线下提号</h1>
|
||||
<p>管理员线下提号,站内上传结算到钱包,平台代管通过线下结算确认打款。</p>
|
||||
<p>各站点独立管理提号记录,可选择本站或另一站点货源;结算仍进入货源站点号主钱包。</p>
|
||||
</div>
|
||||
<div class="toolbar-actions">
|
||||
<el-dropdown
|
||||
@@ -710,6 +724,13 @@ function listingOptionLabel(item: AvailableListing) {
|
||||
|
||||
<el-table v-loading="loading" :data="items" class="table-panel">
|
||||
<el-table-column prop="pickup_no" label="提号编号" width="190" />
|
||||
<el-table-column label="站点关系" width="170">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="row.is_cross_tenant ? 'warning' : 'info'" effect="light" size="small">
|
||||
{{ pickupSiteText(row) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="account_title" label="账号" min-width="180" />
|
||||
<el-table-column label="区服/平台" width="150">
|
||||
<template #default="{ row }"
|
||||
@@ -923,6 +944,13 @@ function listingOptionLabel(item: AvailableListing) {
|
||||
:value="item.id"
|
||||
>
|
||||
<div class="listing-option">
|
||||
<el-tag
|
||||
:type="item.is_cross_tenant ? 'warning' : 'info'"
|
||||
effect="light"
|
||||
size="small"
|
||||
>
|
||||
{{ listingSiteText(item) }}
|
||||
</el-tag>
|
||||
<el-tag
|
||||
:type="pickupSourceTagType(item.account_source)"
|
||||
effect="light"
|
||||
@@ -944,6 +972,9 @@ function listingOptionLabel(item: AvailableListing) {
|
||||
</el-form-item>
|
||||
<el-form-item v-if="selectedListing" label="来源确认">
|
||||
<div class="selected-source">
|
||||
<el-tag :type="selectedListing.is_cross_tenant ? 'warning' : 'info'" effect="light">
|
||||
{{ listingSiteText(selectedListing) }}
|
||||
</el-tag>
|
||||
<el-tag :type="pickupSourceTagType(selectedListing.account_source)" effect="light">
|
||||
{{ pickupSourceLabel(selectedListing.account_source) }}
|
||||
</el-tag>
|
||||
|
||||
Reference in New Issue
Block a user