feat: 优化接单工单资料补充体验
- 区服改为非必填,保持 QQ区/微信区 单选;游戏编号/昵称保持输入框,系统保持安卓/苹果单选 - 后台工单 API 归一化输出资料字段,后台人工补充资料弹窗与收集页字段一致 - 人工补充资料弹窗单选字段由下拉框改为直接点选(Radio) - 买家主页截图支持全局剪贴板粘贴(Ctrl+V/⌘V),并提示点击/粘贴/拖拽三种上传方式
This commit is contained in:
@@ -22,6 +22,7 @@ import {
|
||||
Input,
|
||||
InputNumber,
|
||||
Modal,
|
||||
Radio,
|
||||
Select,
|
||||
Space,
|
||||
Statistic,
|
||||
@@ -1116,7 +1117,7 @@ export default function WorkOrdersPanel() {
|
||||
}
|
||||
>
|
||||
{field.type === 'select' && (field.options || []).length > 0 ? (
|
||||
<Select
|
||||
<Radio.Group
|
||||
options={(field.options || []).map((option) => ({
|
||||
label: option,
|
||||
value: option,
|
||||
@@ -1132,6 +1133,8 @@ export default function WorkOrdersPanel() {
|
||||
scene="collect-material"
|
||||
scope="admin"
|
||||
maxCount={5}
|
||||
showPasteHint
|
||||
captureGlobalPaste
|
||||
value={materialScreenshots}
|
||||
onChange={setMaterialScreenshots}
|
||||
/>
|
||||
|
||||
@@ -9,6 +9,14 @@ import { formatAdminDateTime } from '@/utils/admin-time'
|
||||
|
||||
export { DeadlineCountdown, formatTimeoutPolicyLabel }
|
||||
|
||||
type MappedRequirementField = {
|
||||
key: string
|
||||
label: string
|
||||
required: boolean
|
||||
type: 'text' | 'select'
|
||||
options: string[]
|
||||
}
|
||||
|
||||
export function getRequirementFields(order: WorkOrder | null): CollectField[] {
|
||||
if (!order) return []
|
||||
const rawFields = Array.isArray(order.requirement?.fields)
|
||||
@@ -23,9 +31,13 @@ export function getRequirementFields(order: WorkOrder | null): CollectField[] {
|
||||
key,
|
||||
label: String(source.label || key).trim(),
|
||||
required: source.required !== false,
|
||||
type: source.type === 'select' ? ('select' as const) : ('text' as const),
|
||||
options: Array.isArray(source.options)
|
||||
? source.options.map((option) => String(option || '').trim()).filter(Boolean)
|
||||
: [],
|
||||
}
|
||||
})
|
||||
.filter((item): item is CollectField => Boolean(item))
|
||||
.filter((item): item is MappedRequirementField => Boolean(item))
|
||||
}
|
||||
|
||||
export type DetailFieldItem = {
|
||||
|
||||
Reference in New Issue
Block a user