Files
order_site/apps/frontend/src/pages/collect/CollectMaterialLinkEntryPage.tsx
T
zhaoxing a2cf48f5fc feat(collect): 补资料改为订单号直连并按状态一次性提交
- 公开补资料页 /supplement/:订单号 直接按平台订单号查询,不再依赖链接记录;旧 token 链接一律 404
- 仅「待完善 + 未指派 + 无拼单份额」可提交,提交后状态变为待分配,重复提交返回 409
- 非可编辑工单只返回商品、工单号、状态与客服提示,不返回已填资料和截图
- 管理端新增「重置补资料」:待分配且未指派、无份额、未发布时一键重置回待完善
- 新增 canResetMaterial 能力与 material_reset 流转事件,工单状态文案统一为「待分配」
2026-11-01 18:12:44 +08:00

68 lines
2.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { ArrowRightOutlined } from '@ant-design/icons'
import { App, Button, Card, Form, Input, Space, Typography } from 'antd'
import { useNavigate } from 'react-router'
import { normalizeOrderNoInput } from '@/utils/collect-link'
import { useCollectLinkPageMeta } from './use-collect-link-page-meta'
const { Text, Title } = Typography
/**
* 补资料入口页(`/supplement/`)。
*
* 客户只知道平台订单号时,从这里输入订单号再跳到 `/supplement/<订单号>`;
* 如果客服已经发了完整链接,可以直接打开链接跳过这一步。
*/
export default function CollectMaterialLinkEntryPage() {
const { message } = App.useApp()
const navigate = useNavigate()
useCollectLinkPageMeta('订单资料补充')
function handleFinish(values: { orderNo?: string }) {
const orderNo = normalizeOrderNoInput(values.orderNo)
if (!orderNo) {
message.warning('请输入订单号')
return
}
void navigate(`/supplement/${encodeURIComponent(orderNo)}`)
}
return (
<main className="collect-link-page">
<Card className="collect-link-card" bordered={false}>
<Space direction="vertical" size={16} className="full-width">
<div>
<Title level={3} className="collect-link-title">
订单资料补充
</Title>
<Text type="secondary">请输入下单时使用的订单号,进入补资料页面。</Text>
</div>
<Form layout="vertical" onFinish={handleFinish}>
<Form.Item
name="orderNo"
label="订单号"
rules={[{ required: true, whitespace: true, message: '请输入订单号' }]}
>
<Input autoComplete="off" allowClear placeholder="请输入订单号" size="large" />
</Form.Item>
<Button
type="primary"
size="large"
htmlType="submit"
block
icon={<ArrowRightOutlined />}
>
下一步
</Button>
</Form>
<Text type="secondary" className="collect-link-footnote">
如果客服已经发给你完整链接,直接打开链接即可。
</Text>
</Space>
</Card>
</main>
)
}