fix(distribution): 收紧分销权限与货架状态,开通时创建站点金库
无站点成员不再视为超管;分站下架只改展示状态;装修、批量加价与提现参数对齐。
This commit is contained in:
@@ -514,7 +514,7 @@ export async function fetchSiteWithdrawals(siteID: number, page = 1, pageSize =
|
||||
}
|
||||
|
||||
export interface ApplySiteWithdrawalPayload {
|
||||
site_id: number
|
||||
site_id?: number
|
||||
amount_cent: number
|
||||
account_type: 'alipay' | 'bank'
|
||||
account_name: string
|
||||
|
||||
@@ -150,6 +150,10 @@ export default function Accounts() {
|
||||
const listingIDs = items
|
||||
.filter((it) => selectedRowKeys.includes(it.id))
|
||||
.map((it) => it.listing_id)
|
||||
if (listingIDs.length === 0) {
|
||||
message.warning('请先勾选要加价的商品')
|
||||
return
|
||||
}
|
||||
await batchUpdateAccountMarkup(siteID, listingIDs, markupCent)
|
||||
message.success(`已成功为选中的 ${listingIDs.length} 个商品批量设置加价!`)
|
||||
setSelectedRowKeys([])
|
||||
|
||||
@@ -48,7 +48,7 @@ const REVIEW_STATUS_LABELS: Record<string, { label: string; color: string }> = {
|
||||
|
||||
const LISTING_STATUS_LABELS: Record<string, { label: string; color: string }> = {
|
||||
published: { label: '上架在售', color: 'green' },
|
||||
inactive: { label: '已下架', color: 'default' },
|
||||
offline: { label: '已下架', color: 'default' },
|
||||
closed: { label: '已关闭', color: 'error' },
|
||||
draft: { label: '草稿', color: 'warning' },
|
||||
}
|
||||
@@ -134,7 +134,7 @@ export default function Orders({ kind }: { kind: 'all' | 'sold' | 'receive' }) {
|
||||
}, [kind, activeTab, loadOrders, loadReceivedListings])
|
||||
|
||||
async function handleToggleListingStatus(item: ReceivedListing) {
|
||||
const nextStatus = item.status === 'published' ? 'inactive' : 'published'
|
||||
const nextStatus = item.status === 'offline' ? 'published' : 'offline'
|
||||
const actionName = nextStatus === 'published' ? '重新上架' : '下架'
|
||||
Modal.confirm({
|
||||
title: `确认${actionName}该账号?`,
|
||||
@@ -323,11 +323,11 @@ export default function Orders({ kind }: { kind: 'all' | 'sold' | 'receive' }) {
|
||||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
danger={row.status === 'published'}
|
||||
icon={row.status === 'published' ? <StopOutlined /> : <CheckCircleOutlined />}
|
||||
danger={row.status !== 'offline'}
|
||||
icon={row.status === 'offline' ? <CheckCircleOutlined /> : <StopOutlined />}
|
||||
onClick={() => void handleToggleListingStatus(row)}
|
||||
>
|
||||
{row.status === 'published' ? '下架' : '上架'}
|
||||
{row.status === 'offline' ? '上架' : '下架'}
|
||||
</Button>
|
||||
),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user