feat(order-service): 增加资料提交后自定义说明
This commit is contained in:
@@ -72,6 +72,7 @@ type OrderServiceFormValues = {
|
||||
description: string
|
||||
submitText: string
|
||||
successText: string
|
||||
postSubmitText: string
|
||||
screenshots: ScreenshotForm
|
||||
autoPublish: AutoPublishForm
|
||||
materialConfirmation: OrderServiceMaterialConfirmation
|
||||
@@ -101,6 +102,8 @@ const DEFAULT_MATERIAL_CONFIRMATION: OrderServiceMaterialConfirmation = {
|
||||
cancelText: '返回检查',
|
||||
}
|
||||
|
||||
const DEFAULT_POST_SUBMIT_TEXT = '资料提交后如需修改,请联系客服。'
|
||||
|
||||
type FieldPreset = Omit<OrderServiceField, 'sortOrder'>
|
||||
|
||||
const FIELD_PRESETS: Record<string, FieldPreset> = {
|
||||
@@ -280,6 +283,7 @@ export default function OrderServicePanel() {
|
||||
description: nextProfile?.description || '',
|
||||
submitText: nextProfile?.submitText || '提交资料',
|
||||
successText: nextProfile?.successText || '资料已提交,请等待处理',
|
||||
postSubmitText: nextProfile?.postSubmitText || DEFAULT_POST_SUBMIT_TEXT,
|
||||
screenshots: nextProfile?.screenshots || DEFAULT_SCREENSHOTS,
|
||||
autoPublish: nextProfile?.autoPublish || DEFAULT_AUTO_PUBLISH,
|
||||
materialConfirmation: nextProfile?.materialConfirmation || DEFAULT_MATERIAL_CONFIRMATION,
|
||||
@@ -393,6 +397,7 @@ export default function OrderServicePanel() {
|
||||
materialConfirmation: values.materialConfirmation,
|
||||
submitText: values.submitText,
|
||||
successText: values.successText,
|
||||
postSubmitText: values.postSubmitText,
|
||||
})
|
||||
message.success('草稿已保存;点击“发布新版本”后才会影响新工单')
|
||||
await refresh()
|
||||
@@ -651,6 +656,20 @@ export default function OrderServicePanel() {
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
<Form.Item
|
||||
label="提交后说明"
|
||||
name="postSubmitText"
|
||||
extra="显示在客户页底部,支持换行;适合填写资料修改、客服联系等说明。"
|
||||
>
|
||||
<Input.TextArea
|
||||
autoSize={{ minRows: 2, maxRows: 5 }}
|
||||
maxLength={500}
|
||||
showCount
|
||||
placeholder="资料提交后如需修改,请联系客服。"
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
<div className="order-service-guide">
|
||||
|
||||
@@ -360,7 +360,7 @@ export default function OrderServicePage() {
|
||||
)}
|
||||
|
||||
<Text type="secondary" className="collect-link-footnote">
|
||||
资料提交后如需修改,请联系客服。
|
||||
{pageConfig?.postSubmitText || '资料提交后如需修改,请联系客服。'}
|
||||
</Text>
|
||||
</Space>
|
||||
) : null}
|
||||
|
||||
@@ -1153,6 +1153,7 @@ export type AdminOrderServiceProfile = {
|
||||
materialConfirmation: OrderServiceMaterialConfirmation
|
||||
submitText: string
|
||||
successText: string
|
||||
postSubmitText: string
|
||||
status: 'draft' | 'published' | 'archived' | string
|
||||
currentVersionNo: number | null
|
||||
updatedAt: string
|
||||
@@ -1200,6 +1201,7 @@ export function saveAdminOrderServiceProfile(payload: {
|
||||
materialConfirmation: OrderServiceMaterialConfirmation
|
||||
submitText?: string
|
||||
successText?: string
|
||||
postSubmitText?: string
|
||||
}) {
|
||||
return apiPost<{ profile: AdminOrderServiceProfile }>(
|
||||
'/api/v1/admin/worker-platform/order-service/profiles',
|
||||
|
||||
@@ -593,6 +593,7 @@ export type OrderServiceItem = {
|
||||
description: string
|
||||
submitText: string
|
||||
successText: string
|
||||
postSubmitText: string
|
||||
state: string
|
||||
stateLabel: string
|
||||
message: string
|
||||
|
||||
@@ -729,6 +729,7 @@
|
||||
display: block;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
|
||||
Reference in New Issue
Block a user