feat(consignment): 苏尔南寄卖接入打手端押金履约
打手可直接提报寄卖,关联 worker 与履约押金后指派交枪;后台去掉旧收集链接管理,提报审核与库存/工单流程对齐接单平台。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,16 +1,6 @@
|
||||
import {
|
||||
CheckCircleOutlined,
|
||||
CloseCircleOutlined,
|
||||
CopyOutlined,
|
||||
EyeOutlined,
|
||||
LinkOutlined,
|
||||
PlusOutlined,
|
||||
ReloadOutlined,
|
||||
} from '@ant-design/icons'
|
||||
import { CheckCircleOutlined, CloseCircleOutlined, EyeOutlined, ReloadOutlined } from '@ant-design/icons'
|
||||
import { useQuery } from '@tanstack/react-query'
|
||||
import {
|
||||
Alert,
|
||||
App,
|
||||
Badge,
|
||||
Button,
|
||||
Card,
|
||||
@@ -25,49 +15,49 @@ import {
|
||||
Row,
|
||||
Select,
|
||||
Space,
|
||||
Switch,
|
||||
Table,
|
||||
Tabs,
|
||||
Tag,
|
||||
Typography,
|
||||
App,
|
||||
} from 'antd'
|
||||
import type { TableColumnsType } from 'antd'
|
||||
import { useState } from 'react'
|
||||
|
||||
import {
|
||||
approveAdminConsignmentSubmission,
|
||||
createAdminConsignmentLink,
|
||||
fetchAdminConsignmentLinks,
|
||||
fetchAdminConsignmentSubmissions,
|
||||
rejectAdminConsignmentSubmission,
|
||||
updateAdminConsignmentLink,
|
||||
} from '@/services/admin/consignment'
|
||||
import type { ConsignmentCollectLink, ConsignmentSubmission } from '@/types/consignment'
|
||||
import { fetchAdminWorkerUsers } from '@/services/admin/worker-platform'
|
||||
import type { ConsignmentSubmission } from '@/types/consignment'
|
||||
|
||||
const { Text } = Typography
|
||||
|
||||
export default function ConsignmentSubmissionsPanel() {
|
||||
const { message } = App.useApp()
|
||||
const [activeSubTab, setActiveSubTab] = useState<'submissions' | 'links'>('submissions')
|
||||
|
||||
// 提报审核状态
|
||||
const [submissionStatus, setSubmissionStatus] = useState<string>('pending_review')
|
||||
const [submissionKeyword, setSubmissionKeyword] = useState<string>('')
|
||||
const [submissionPage, setSubmissionPage] = useState<number>(1)
|
||||
const [submissionPageSize, setSubmissionPageSize] = useState<number>(20)
|
||||
|
||||
// 弹窗状态
|
||||
const [createLinkModalOpen, setCreateLinkModalOpen] = useState(false)
|
||||
const [createdLinkUrl, setCreatedLinkUrl] = useState<string>('')
|
||||
const [approveModalItem, setApproveModalItem] = useState<ConsignmentSubmission | null>(null)
|
||||
const [rejectModalItem, setRejectModalItem] = useState<ConsignmentSubmission | null>(null)
|
||||
const [viewingSubmission, setViewingSubmission] = useState<ConsignmentSubmission | null>(null)
|
||||
|
||||
const [rejectNote, setRejectNote] = useState('')
|
||||
const [linkForm] = Form.useForm()
|
||||
const [approveForm] = Form.useForm()
|
||||
|
||||
// 查询提报列表
|
||||
const workersQuery = useQuery({
|
||||
queryKey: ['admin-worker-users-consignment-options'],
|
||||
queryFn: () => fetchAdminWorkerUsers({ page: 1, pageSize: 200, status: 'active' }),
|
||||
})
|
||||
const workerOptions = (workersQuery.data?.data.items || []).map((w) => ({
|
||||
label: `${w.displayName || w.username} (${w.phone || '无手机号'}) [ID:${w.workerId}]`,
|
||||
value: w.workerId,
|
||||
phone: w.phone,
|
||||
name: w.displayName || w.username,
|
||||
}))
|
||||
|
||||
const submissionsQuery = useQuery({
|
||||
queryKey: [
|
||||
'admin-consignment-submissions',
|
||||
@@ -85,83 +75,19 @@ export default function ConsignmentSubmissionsPanel() {
|
||||
}),
|
||||
})
|
||||
|
||||
// 查询链接列表
|
||||
const linksQuery = useQuery({
|
||||
queryKey: ['admin-consignment-links'],
|
||||
queryFn: () => fetchAdminConsignmentLinks(),
|
||||
})
|
||||
|
||||
const submissions = submissionsQuery.data?.data.items || []
|
||||
const submissionTotal = submissionsQuery.data?.data.total || 0
|
||||
const links = Array.isArray(linksQuery.data?.data)
|
||||
? linksQuery.data?.data
|
||||
: linksQuery.data?.data?.items || []
|
||||
const pendingCount = submissions.filter((s) => s.status === 'pending_review').length
|
||||
|
||||
// 复制收集公开链接
|
||||
function copyPublicLink(token: string) {
|
||||
const origin = window.location.origin
|
||||
const url = `${origin}/#/consignment-collect/${token}`
|
||||
void navigator.clipboard.writeText(url)
|
||||
message.success('收集链接已复制到剪贴板,可直接发给客户!')
|
||||
}
|
||||
|
||||
// 切换链接启用/关闭
|
||||
async function handleToggleLink(record: ConsignmentCollectLink, enabled: boolean) {
|
||||
try {
|
||||
await updateAdminConsignmentLink(record.id, { enabled })
|
||||
message.success(enabled ? '链接已开启' : '链接已关闭')
|
||||
await linksQuery.refetch()
|
||||
} catch (err: any) {
|
||||
message.error(err.message || '更新失败')
|
||||
}
|
||||
}
|
||||
|
||||
// 创建收集链接
|
||||
async function handleCreateLinkSubmit() {
|
||||
try {
|
||||
const values = await linkForm.validateFields()
|
||||
const presetPriceFen = Math.round(Number(values.presetPrice || 0) * 100)
|
||||
const briStr = values.brillianceCount > 0 ? `${values.brillianceCount}璀璨` : ''
|
||||
const defaultTitle = `${values.system}${values.serverZone}${values.series}${values.diamondLevel}钻${briStr} 寄卖征集`
|
||||
|
||||
const res = await createAdminConsignmentLink({
|
||||
title: values.title || defaultTitle,
|
||||
system: values.system,
|
||||
serverZone: values.serverZone,
|
||||
series: values.series,
|
||||
diamondLevel: Number(values.diamondLevel || 1),
|
||||
brillianceCount: Number(values.brillianceCount || 0),
|
||||
presetPriceFen,
|
||||
buyerName: values.buyerName,
|
||||
inboundBatch: values.inboundBatch,
|
||||
isMultiUse: values.isMultiUse !== false,
|
||||
})
|
||||
|
||||
const token = res.data?.token || ''
|
||||
const url = `${window.location.origin}/#/consignment-collect/${token}`
|
||||
setCreatedLinkUrl(url)
|
||||
try {
|
||||
await navigator.clipboard.writeText(url)
|
||||
} catch {
|
||||
// clipboard access might be unavailable
|
||||
}
|
||||
|
||||
message.success('收集链接生成成功!')
|
||||
setCreateLinkModalOpen(false)
|
||||
linkForm.resetFields()
|
||||
await linksQuery.refetch()
|
||||
} catch (err: any) {
|
||||
if (err.errorFields) return
|
||||
message.error(err.message || '创建收集链接失败')
|
||||
}
|
||||
}
|
||||
|
||||
// 审核通过并入库
|
||||
async function handleApproveSubmit() {
|
||||
if (!approveModalItem) return
|
||||
try {
|
||||
const values = await approveForm.validateFields()
|
||||
const costPriceFen = Math.round(Number(values.costPrice || 0) * 100)
|
||||
const depositAmountFen = values.depositAmount
|
||||
? Math.round(Number(values.depositAmount) * 100)
|
||||
: undefined
|
||||
const selectedWorker = workerOptions.find((w) => w.value === values.workerId)
|
||||
|
||||
await approveAdminConsignmentSubmission(approveModalItem.id, {
|
||||
costPriceFen,
|
||||
@@ -178,6 +104,10 @@ export default function ConsignmentSubmissionsPanel() {
|
||||
sellerGameId: values.sellerGameId,
|
||||
sellerPaymentInfo: values.sellerPaymentInfo,
|
||||
sellerPhone: values.sellerPhone,
|
||||
workerId: values.workerId || undefined,
|
||||
workerName: selectedWorker?.name || approveModalItem.workerName || undefined,
|
||||
workerPhone: selectedWorker?.phone || approveModalItem.workerPhone || undefined,
|
||||
depositAmountFen,
|
||||
reviewNote: values.reviewNote,
|
||||
})
|
||||
|
||||
@@ -190,7 +120,6 @@ export default function ConsignmentSubmissionsPanel() {
|
||||
}
|
||||
}
|
||||
|
||||
// 驳回提报
|
||||
async function handleRejectConfirm() {
|
||||
if (!rejectModalItem) return
|
||||
try {
|
||||
@@ -204,18 +133,22 @@ export default function ConsignmentSubmissionsPanel() {
|
||||
}
|
||||
}
|
||||
|
||||
// 提报列表列定义
|
||||
function resolveSubmissionSource(record: ConsignmentSubmission) {
|
||||
const channel = (record.contentJson as { channel?: string } | undefined)?.channel
|
||||
if (channel === 'worker_portal' || record.workerId) return '打手端提报'
|
||||
if (record.linkTitle) return `旧收集链接: ${record.linkTitle}`
|
||||
return '其他渠道'
|
||||
}
|
||||
|
||||
const submissionColumns: TableColumnsType<ConsignmentSubmission> = [
|
||||
{
|
||||
title: '提报单号',
|
||||
key: 'submissionNo',
|
||||
width: 170,
|
||||
width: 180,
|
||||
render: (_, record) => (
|
||||
<div>
|
||||
<Text strong>{record.submissionNo}</Text>
|
||||
{record.linkTitle ? (
|
||||
<div style={{ fontSize: 11, color: '#8c8c8c' }}>来自: {record.linkTitle}</div>
|
||||
) : null}
|
||||
<div style={{ fontSize: 11, color: '#8c8c8c' }}>{resolveSubmissionSource(record)}</div>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
@@ -249,14 +182,24 @@ export default function ConsignmentSubmissionsPanel() {
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '卖家联系方式',
|
||||
title: '卖家与关联打手',
|
||||
key: 'contact',
|
||||
width: 180,
|
||||
width: 200,
|
||||
render: (_, record) => (
|
||||
<div style={{ fontSize: 12 }}>
|
||||
<div>联系: {record.contactInfo}</div>
|
||||
{record.sellerGameId ? <div>游戏ID: {record.sellerGameId}</div> : null}
|
||||
{record.sellerPhone ? <div>电话: {record.sellerPhone}</div> : null}
|
||||
{record.workerId ? (
|
||||
<div style={{ marginTop: 4 }}>
|
||||
<Tag color="blue">
|
||||
打手: {record.workerName || `ID:${record.workerId}`}
|
||||
{record.depositAmountFen
|
||||
? ` (押¥${(record.depositAmountFen / 100).toFixed(0)})`
|
||||
: ''}
|
||||
</Tag>
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
),
|
||||
},
|
||||
@@ -298,7 +241,7 @@ export default function ConsignmentSubmissionsPanel() {
|
||||
{
|
||||
title: '操作',
|
||||
key: 'actions',
|
||||
width: 160,
|
||||
width: 200,
|
||||
render: (_, record) => (
|
||||
<Space size={8}>
|
||||
<Button
|
||||
@@ -314,6 +257,7 @@ export default function ConsignmentSubmissionsPanel() {
|
||||
<Button
|
||||
size="small"
|
||||
type="primary"
|
||||
icon={<CheckCircleOutlined />}
|
||||
onClick={() => {
|
||||
setApproveModalItem(record)
|
||||
approveForm.setFieldsValue({
|
||||
@@ -322,6 +266,10 @@ export default function ConsignmentSubmissionsPanel() {
|
||||
sellerContact: record.contactInfo,
|
||||
buyerName: '客服',
|
||||
inboundBatch: new Date().toISOString().slice(0, 7),
|
||||
workerId: record.workerId || undefined,
|
||||
depositAmount: record.depositAmountFen
|
||||
? record.depositAmountFen / 100
|
||||
: record.askingPriceFen / 100,
|
||||
})
|
||||
}}
|
||||
>
|
||||
@@ -331,6 +279,7 @@ export default function ConsignmentSubmissionsPanel() {
|
||||
size="small"
|
||||
danger
|
||||
type="text"
|
||||
icon={<CloseCircleOutlined />}
|
||||
onClick={() => {
|
||||
setRejectModalItem(record)
|
||||
setRejectNote('')
|
||||
@@ -345,334 +294,65 @@ export default function ConsignmentSubmissionsPanel() {
|
||||
},
|
||||
]
|
||||
|
||||
// 链接列表列定义
|
||||
const linkColumns: TableColumnsType<ConsignmentCollectLink> = [
|
||||
{
|
||||
title: '收集标题 / 规格',
|
||||
key: 'title',
|
||||
width: 280,
|
||||
render: (_, record) => {
|
||||
const fullUrl = `${window.location.origin}/#/consignment-collect/${record.token}`
|
||||
return (
|
||||
<div>
|
||||
<div style={{ fontWeight: 600 }}>{record.title}</div>
|
||||
<Space size={4} wrap style={{ marginTop: 4 }}>
|
||||
<Tag color={record.system === '苹果' ? 'geekblue' : 'green'}>
|
||||
{record.system || '通用'}
|
||||
</Tag>
|
||||
<Tag color="cyan">{record.serverZone || '全区'}</Tag>
|
||||
<Tag color="orange">{record.series || '通用'}</Tag>
|
||||
<Tag color="gold">{record.diamondLevel || 1} 钻</Tag>
|
||||
{record.brillianceCount > 0 ? (
|
||||
<Tag color="magenta">{record.brillianceCount} 璀璨</Tag>
|
||||
) : null}
|
||||
</Space>
|
||||
<div style={{ marginTop: 6 }}>
|
||||
<Text
|
||||
copyable={{ text: fullUrl }}
|
||||
style={{ fontSize: 11, color: '#1890ff', wordBreak: 'break-all' }}
|
||||
>
|
||||
{fullUrl}
|
||||
</Text>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '指导参考价',
|
||||
key: 'price',
|
||||
width: 110,
|
||||
render: (_, record) => (
|
||||
<Text strong style={{ color: '#cf1322' }}>
|
||||
¥{(record.presetPriceFen / 100).toFixed(2)}
|
||||
</Text>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '创建人/批次',
|
||||
key: 'creator',
|
||||
width: 140,
|
||||
render: (_, record) => (
|
||||
<div>
|
||||
<div>{record.createdBy || '-'}</div>
|
||||
{record.inboundBatch ? (
|
||||
<div style={{ fontSize: 11, color: '#8c8c8c' }}>批次: {record.inboundBatch}</div>
|
||||
) : null}
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '提报数量',
|
||||
key: 'count',
|
||||
width: 100,
|
||||
render: (_, record) => (
|
||||
<Badge
|
||||
count={record.submissionCount || 0}
|
||||
showZero
|
||||
style={{ backgroundColor: (record.submissionCount || 0) > 0 ? '#52c41a' : '#d9d9d9' }}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '状态开关',
|
||||
key: 'enabled',
|
||||
width: 100,
|
||||
render: (_, record) => (
|
||||
<Switch
|
||||
checked={record.enabled}
|
||||
checkedChildren="开启"
|
||||
unCheckedChildren="关闭"
|
||||
onChange={(checked) => handleToggleLink(record, checked)}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'actions',
|
||||
width: 180,
|
||||
render: (_, record) => (
|
||||
<Space size={8}>
|
||||
<Button
|
||||
size="small"
|
||||
type="primary"
|
||||
ghost
|
||||
icon={<CopyOutlined />}
|
||||
onClick={() => copyPublicLink(record.token)}
|
||||
>
|
||||
复制公开链接
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]
|
||||
|
||||
return (
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
|
||||
<Tabs
|
||||
activeKey={activeSubTab}
|
||||
onChange={(k) => setActiveSubTab(k as any)}
|
||||
items={[
|
||||
{
|
||||
key: 'submissions',
|
||||
label: (
|
||||
<span>
|
||||
玩家提报审核{' '}
|
||||
{submissions.filter((s) => s.status === 'pending_review').length > 0 ? (
|
||||
<Badge
|
||||
count={submissions.filter((s) => s.status === 'pending_review').length}
|
||||
offset={[6, -2]}
|
||||
/>
|
||||
) : null}
|
||||
</span>
|
||||
),
|
||||
children: (
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
|
||||
{/* 过滤条 */}
|
||||
<Card size="small">
|
||||
<Space wrap size={12}>
|
||||
<Radio.Group
|
||||
value={submissionStatus}
|
||||
onChange={(e) => {
|
||||
setSubmissionStatus(e.target.value)
|
||||
setSubmissionPage(1)
|
||||
}}
|
||||
buttonStyle="solid"
|
||||
>
|
||||
<Radio.Button value="pending_review">待客服审核</Radio.Button>
|
||||
<Radio.Button value="approved">已审核入库</Radio.Button>
|
||||
<Radio.Button value="rejected">已驳回</Radio.Button>
|
||||
<Radio.Button value="all">全部</Radio.Button>
|
||||
</Radio.Group>
|
||||
|
||||
<Input.Search
|
||||
placeholder="搜索提报单号/微信号/游戏ID"
|
||||
allowClear
|
||||
style={{ width: 240 }}
|
||||
onSearch={(v) => {
|
||||
setSubmissionKeyword(v)
|
||||
setSubmissionPage(1)
|
||||
}}
|
||||
/>
|
||||
|
||||
<Button icon={<ReloadOutlined />} onClick={() => submissionsQuery.refetch()}>
|
||||
刷新
|
||||
</Button>
|
||||
</Space>
|
||||
</Card>
|
||||
|
||||
{/* 提报审核表格 */}
|
||||
<Card size="small">
|
||||
<Table
|
||||
rowKey="id"
|
||||
columns={submissionColumns}
|
||||
dataSource={submissions}
|
||||
loading={submissionsQuery.isLoading}
|
||||
pagination={{
|
||||
current: submissionPage,
|
||||
pageSize: submissionPageSize,
|
||||
total: submissionTotal,
|
||||
showSizeChanger: true,
|
||||
showTotal: (t) => `共 ${t} 条提报记录`,
|
||||
onChange: (p, ps) => {
|
||||
setSubmissionPage(p)
|
||||
setSubmissionPageSize(ps)
|
||||
},
|
||||
}}
|
||||
/>
|
||||
</Card>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
key: 'links',
|
||||
label: '收集链接生成与管理',
|
||||
children: (
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
|
||||
<Card size="small">
|
||||
<Space wrap size={12}>
|
||||
<Button
|
||||
type="primary"
|
||||
icon={<PlusOutlined />}
|
||||
onClick={() => {
|
||||
linkForm.resetFields()
|
||||
linkForm.setFieldsValue({
|
||||
system: '苹果',
|
||||
serverZone: '微信区',
|
||||
series: '暗潮',
|
||||
diamondLevel: 1,
|
||||
brillianceCount: 0,
|
||||
isMultiUse: true,
|
||||
buyerName: '客服',
|
||||
})
|
||||
setCreateLinkModalOpen(true)
|
||||
}}
|
||||
>
|
||||
生成定向收集链接
|
||||
</Button>
|
||||
<Button icon={<ReloadOutlined />} onClick={() => linksQuery.refetch()}>
|
||||
刷新
|
||||
</Button>
|
||||
</Space>
|
||||
</Card>
|
||||
|
||||
<Card size="small">
|
||||
<Table
|
||||
rowKey="id"
|
||||
columns={linkColumns}
|
||||
dataSource={links}
|
||||
loading={linksQuery.isLoading}
|
||||
pagination={false}
|
||||
/>
|
||||
</Card>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
|
||||
{/* 生成收集链接弹窗 */}
|
||||
<Modal
|
||||
title="生成寄卖线索收集链接"
|
||||
open={createLinkModalOpen}
|
||||
width={600}
|
||||
onCancel={() => setCreateLinkModalOpen(false)}
|
||||
onOk={handleCreateLinkSubmit}
|
||||
destroyOnClose
|
||||
>
|
||||
<Form form={linkForm} layout="vertical">
|
||||
<Row gutter={16}>
|
||||
<Col span={8}>
|
||||
<Form.Item name="system" label="指定系统" rules={[{ required: true }]}>
|
||||
<Select
|
||||
options={[
|
||||
{ label: '苹果 (iOS)', value: '苹果' },
|
||||
{ label: '安卓 (Android)', value: '安卓' },
|
||||
{ label: '通用', value: '通用' },
|
||||
]}
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item name="serverZone" label="指定区服" rules={[{ required: true }]}>
|
||||
<Select
|
||||
options={[
|
||||
{ label: '微信区', value: '微信区' },
|
||||
{ label: 'QQ区', value: 'QQ区' },
|
||||
]}
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item name="series" label="枪系/系列" rules={[{ required: true }]}>
|
||||
<Select
|
||||
options={[
|
||||
{ label: '暗潮', value: '暗潮' },
|
||||
{ label: '怒嚎', value: '怒嚎' },
|
||||
{ label: '血宴', value: '血宴' },
|
||||
{ label: '矩阵', value: '矩阵' },
|
||||
{ label: '其他', value: '其他' },
|
||||
]}
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
<Row gutter={16}>
|
||||
<Col span={8}>
|
||||
<Form.Item name="diamondLevel" label="钻石等级" rules={[{ required: true }]}>
|
||||
<Select
|
||||
options={[
|
||||
{ label: '1 钻', value: 1 },
|
||||
{ label: '2 钻', value: 2 },
|
||||
{ label: '3 钻', value: 3 },
|
||||
{ label: '4 钻', value: 4 },
|
||||
{ label: '5 钻', value: 5 },
|
||||
{ label: '6 钻', value: 6 },
|
||||
]}
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item name="brillianceCount" label="璀璨数">
|
||||
<InputNumber min={0} max={6} style={{ width: '100%' }} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item name="presetPrice" label="指导收购价 (元)">
|
||||
<InputNumber min={0} style={{ width: '100%' }} placeholder="如 80" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
<Form.Item
|
||||
name="title"
|
||||
label="链接标题 (留空则根据规格自动生成)"
|
||||
tooltip="玩家打开链接时看到的标题"
|
||||
<Card size="small">
|
||||
<Space wrap size={12}>
|
||||
<Radio.Group
|
||||
value={submissionStatus}
|
||||
onChange={(e) => {
|
||||
setSubmissionStatus(e.target.value)
|
||||
setSubmissionPage(1)
|
||||
}}
|
||||
buttonStyle="solid"
|
||||
>
|
||||
<Input placeholder="如:【高价收】苹果微信暗潮1钻 极速审核" />
|
||||
</Form.Item>
|
||||
<Radio.Button value="pending_review">
|
||||
待客服审核
|
||||
{pendingCount > 0 ? (
|
||||
<Badge count={pendingCount} size="small" offset={[6, -2]} />
|
||||
) : null}
|
||||
</Radio.Button>
|
||||
<Radio.Button value="approved">已审核入库</Radio.Button>
|
||||
<Radio.Button value="rejected">已驳回</Radio.Button>
|
||||
<Radio.Button value="all">全部</Radio.Button>
|
||||
</Radio.Group>
|
||||
|
||||
<Row gutter={16}>
|
||||
<Col span={12}>
|
||||
<Form.Item name="buyerName" label="默认收购人">
|
||||
<Input placeholder="客服姓名" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item name="inboundBatch" label="归属批次">
|
||||
<Input placeholder="如 202609-01" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
<Input.Search
|
||||
placeholder="搜索提报单号/微信号/游戏ID/打手"
|
||||
allowClear
|
||||
style={{ width: 260 }}
|
||||
onSearch={(v) => {
|
||||
setSubmissionKeyword(v)
|
||||
setSubmissionPage(1)
|
||||
}}
|
||||
/>
|
||||
|
||||
<Form.Item name="isMultiUse" label="允许多次提报" valuePropName="checked">
|
||||
<Switch defaultChecked checkedChildren="多人可填" unCheckedChildren="单次失效" />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</Modal>
|
||||
<Button icon={<ReloadOutlined />} onClick={() => submissionsQuery.refetch()}>
|
||||
刷新
|
||||
</Button>
|
||||
</Space>
|
||||
</Card>
|
||||
|
||||
<Card size="small">
|
||||
<Table
|
||||
rowKey="id"
|
||||
columns={submissionColumns}
|
||||
dataSource={submissions}
|
||||
loading={submissionsQuery.isLoading}
|
||||
pagination={{
|
||||
current: submissionPage,
|
||||
pageSize: submissionPageSize,
|
||||
total: submissionTotal,
|
||||
showSizeChanger: true,
|
||||
showTotal: (t) => `共 ${t} 条提报记录`,
|
||||
onChange: (p, ps) => {
|
||||
setSubmissionPage(p)
|
||||
setSubmissionPageSize(ps)
|
||||
},
|
||||
}}
|
||||
/>
|
||||
</Card>
|
||||
|
||||
{/* 审核入库弹窗 */}
|
||||
<Modal
|
||||
title="审核寄卖申请并正式入库"
|
||||
open={Boolean(approveModalItem)}
|
||||
@@ -716,24 +396,66 @@ export default function ConsignmentSubmissionsPanel() {
|
||||
</Row>
|
||||
|
||||
<Row gutter={16}>
|
||||
<Col span={6}>
|
||||
<Col span={5}>
|
||||
<Form.Item name="system" label="系统">
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
<Col span={5}>
|
||||
<Form.Item name="serverZone" label="区服">
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
<Col span={5}>
|
||||
<Form.Item name="series" label="系列">
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
<Form.Item name="diamondLevel" label="钻石等级">
|
||||
<InputNumber min={1} max={6} style={{ width: '100%' }} />
|
||||
<Col span={5}>
|
||||
<Form.Item name="diamondLevel" label="钻石等级 (1-7)">
|
||||
<InputNumber min={1} max={7} style={{ width: '100%' }} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={4}>
|
||||
<Form.Item name="brillianceCount" label="璀璨数 (0-7)">
|
||||
<InputNumber min={0} max={7} style={{ width: '100%' }} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
<Row gutter={16}>
|
||||
<Col span={14}>
|
||||
<Form.Item
|
||||
name="workerId"
|
||||
label="走打手接单平台 (关联履约打手)"
|
||||
tooltip="指派该打手接单丢枪交货时,接单平台将自动冻结其押金并担保交付"
|
||||
>
|
||||
<Select
|
||||
allowClear
|
||||
showSearch
|
||||
filterOption={(input, option) =>
|
||||
String(option?.label ?? '')
|
||||
.toLowerCase()
|
||||
.includes(input.toLowerCase())
|
||||
}
|
||||
placeholder="可选择关联的接单打手 (选填)"
|
||||
options={workerOptions}
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={10}>
|
||||
<Form.Item
|
||||
name="depositAmount"
|
||||
label="履约押金金额 (元)"
|
||||
tooltip="指派该打手交枪履约时,系统冻结的押金金额"
|
||||
>
|
||||
<InputNumber
|
||||
min={0}
|
||||
step={10}
|
||||
addonBefore="¥"
|
||||
style={{ width: '100%' }}
|
||||
placeholder="如 100"
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
@@ -788,7 +510,6 @@ export default function ConsignmentSubmissionsPanel() {
|
||||
</Form>
|
||||
</Modal>
|
||||
|
||||
{/* 驳回弹窗 */}
|
||||
<Modal
|
||||
title="驳回寄卖提报"
|
||||
open={Boolean(rejectModalItem)}
|
||||
@@ -814,7 +535,6 @@ export default function ConsignmentSubmissionsPanel() {
|
||||
</Form>
|
||||
</Modal>
|
||||
|
||||
{/* 提报详情查看弹窗 */}
|
||||
<Modal
|
||||
title={`提报详情 [${viewingSubmission?.submissionNo}]`}
|
||||
open={Boolean(viewingSubmission)}
|
||||
@@ -831,6 +551,9 @@ export default function ConsignmentSubmissionsPanel() {
|
||||
<Descriptions.Item label="提报单号" span={2}>
|
||||
<Text copyable>{viewingSubmission.submissionNo}</Text>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="来源" span={2}>
|
||||
{resolveSubmissionSource(viewingSubmission)}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="物品名称" span={2}>
|
||||
{viewingSubmission.itemName}
|
||||
</Descriptions.Item>
|
||||
@@ -853,6 +576,23 @@ export default function ConsignmentSubmissionsPanel() {
|
||||
<Descriptions.Item label="卖家游戏ID" span={2}>
|
||||
<Text copyable>{viewingSubmission.sellerGameId || '-'}</Text>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="关联接单打手">
|
||||
{viewingSubmission.workerId ? (
|
||||
<Tag color="blue">
|
||||
{viewingSubmission.workerName || `ID:${viewingSubmission.workerId}`} (
|
||||
{viewingSubmission.workerPhone || '无手机号'})
|
||||
</Tag>
|
||||
) : (
|
||||
<Text type="secondary">未关联打手账号</Text>
|
||||
)}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="履约押金要求">
|
||||
{viewingSubmission.depositAmountFen ? (
|
||||
<Tag color="gold">¥{(viewingSubmission.depositAmountFen / 100).toFixed(0)}</Tag>
|
||||
) : (
|
||||
<Text type="secondary">按平台默认规则</Text>
|
||||
)}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="卖家收款方式" span={2}>
|
||||
<Text copyable>{viewingSubmission.sellerPaymentInfo || '-'}</Text>
|
||||
</Descriptions.Item>
|
||||
@@ -894,56 +634,6 @@ export default function ConsignmentSubmissionsPanel() {
|
||||
</Descriptions>
|
||||
) : null}
|
||||
</Modal>
|
||||
|
||||
{/* 链接生成成功提示弹窗 */}
|
||||
<Modal
|
||||
title="收集链接生成成功"
|
||||
open={Boolean(createdLinkUrl)}
|
||||
onCancel={() => setCreatedLinkUrl('')}
|
||||
footer={[
|
||||
<Button
|
||||
key="copy"
|
||||
type="primary"
|
||||
icon={<CopyOutlined />}
|
||||
onClick={() => {
|
||||
void navigator.clipboard?.writeText(createdLinkUrl)
|
||||
message.success('链接已复制到剪贴板!')
|
||||
}}
|
||||
>
|
||||
复制公开链接
|
||||
</Button>,
|
||||
<Button key="close" onClick={() => setCreatedLinkUrl('')}>
|
||||
完成
|
||||
</Button>,
|
||||
]}
|
||||
>
|
||||
<Alert
|
||||
type="success"
|
||||
showIcon
|
||||
message="定向收集链接已就绪"
|
||||
description="该链接已自动复制到剪贴板。您可以直接发送给玩家卖家,玩家免登录打开即可登记账号与装备信息并上传凭据截图。"
|
||||
style={{ marginBottom: 16 }}
|
||||
/>
|
||||
<div style={{ marginBottom: 8 }}>
|
||||
<Text strong>公开收集链接:</Text>
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
padding: '12px 16px',
|
||||
background: '#f6ffed',
|
||||
border: '1px solid #b7eb8f',
|
||||
borderRadius: 6,
|
||||
wordBreak: 'break-all',
|
||||
}}
|
||||
>
|
||||
<Text
|
||||
copyable={{ text: createdLinkUrl }}
|
||||
style={{ fontSize: 13, color: '#389e0d', fontWeight: 500 }}
|
||||
>
|
||||
{createdLinkUrl}
|
||||
</Text>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user