style(consignment): 联系方式与游戏凭据分区移到规格字段之后

This commit is contained in:
2026-11-06 13:35:32 +08:00
parent 3aa01136a5
commit 374e2a69df
2 changed files with 426 additions and 422 deletions
@@ -1116,428 +1116,6 @@ export default function ConsignmentConfigPanel() {
<div className="order-service-section-head">
<ConsignmentSectionTitle
index="03"
title="价格配置"
description="按接单模板价打折,或按模板价固定下调;没有模板价一律阻止发布"
/>
</div>
<Alert
type="info"
showIcon
message="寄售价始终基于接单模板价计算;该规格没有模板价时,打手端会直接阻止发布。"
style={{ marginBottom: 12 }}
/>
<div style={gridStyle}>
<Form.Item
label="价格类型"
name={['pricing', 'priceType']}
style={{ marginBottom: 0 }}
>
<Radio.Group
optionType="button"
buttonStyle="solid"
options={[
{ value: 'template_discount', label: '接单模板价打折' },
{ value: 'template_minus', label: '模板价固定下调' },
]}
/>
</Form.Item>
{priceType === 'template_minus' ? (
<Form.Item
label="固定下调(元)"
name={['pricing', 'minusYuan']}
rules={[{ type: 'number', min: 0 }]}
extra="售价 = 接单模板价 − 固定下调金额;下调后不足 1 元会被拒绝"
style={{ marginBottom: 0 }}
>
<InputNumber
min={0}
precision={2}
style={{ width: '100%' }}
addonBefore="¥"
/>
</Form.Item>
) : (
<Form.Item
label="模板折扣"
name={['pricing', 'discount']}
rules={[{ type: 'number', min: 0.1, max: 10 }]}
extra="例如 9.5 折 = 接单模板价 × 95%"
style={{ marginBottom: 0 }}
>
<InputNumber
min={0.1}
max={10}
step={0.1}
precision={1}
style={{ width: '100%' }}
addonAfter="折"
/>
</Form.Item>
)}
<Form.Item
label="允许打手改价"
name={['pricing', 'allowWorkerPrice']}
valuePropName="checked"
extra="打手只能按系统建议价往下调"
style={{ marginBottom: 0 }}
>
<Switch checkedChildren="允许" unCheckedChildren="不允许" />
</Form.Item>
<Form.Item
label="最低售价(元)"
name={['pricing', 'minPriceYuan']}
style={{ marginBottom: 0 }}
>
<InputNumber
min={0}
precision={2}
style={{ width: '100%' }}
addonBefore="¥"
/>
</Form.Item>
</div>
</section>
<section className="order-service-section">
<div className="order-service-section-head">
<ConsignmentSectionTitle
index="04"
title="履约保证金"
description="开启后按配置冻结;关闭时使用平台统一发布押金"
/>
</div>
<div style={gridStyle}>
<Form.Item
label="开启保证金"
name={['deposit', 'enabled']}
valuePropName="checked"
style={{ marginBottom: 0 }}
>
<Switch checkedChildren="开启" unCheckedChildren="关闭" />
</Form.Item>
{depositEnabled ? (
<Form.Item
label="保证金模式"
name={['deposit', 'mode']}
style={{ marginBottom: 0 }}
>
<Select
options={[
{ value: 'fixed', label: '固定金额' },
{ value: 'per_quantity', label: '按数量' },
]}
/>
</Form.Item>
) : null}
{depositEnabled && depositMode === 'fixed' ? (
<Form.Item
label="固定金额(元)"
name={['deposit', 'fixedAmountYuan']}
style={{ marginBottom: 0 }}
>
<InputNumber
min={0}
precision={2}
style={{ width: '100%' }}
addonBefore="¥"
/>
</Form.Item>
) : null}
{depositEnabled && depositMode === 'per_quantity' ? (
<Form.Item
label="每件金额(元)"
name={['deposit', 'unitAmountYuan']}
style={{ marginBottom: 0 }}
>
<InputNumber
min={0}
precision={2}
style={{ width: '100%' }}
addonBefore="¥"
/>
</Form.Item>
) : null}
</div>
</section>
<section className="order-service-section">
<div className="order-service-section-head">
<ConsignmentSectionTitle
index="05"
title="服务费"
description="按成交金额比例或固定金额收取"
/>
</div>
<div style={gridStyle}>
<Form.Item
label="开启服务费"
name={['serviceFee', 'enabled']}
valuePropName="checked"
style={{ marginBottom: 0 }}
>
<Switch checkedChildren="开启" unCheckedChildren="关闭" />
</Form.Item>
{serviceFeeEnabled ? (
<Form.Item
label="服务费模式"
name={['serviceFee', 'mode']}
style={{ marginBottom: 0 }}
>
<Select
options={[
{ value: 'percent', label: '按比例 %' },
{ value: 'fixed', label: '固定金额' },
]}
/>
</Form.Item>
) : null}
{serviceFeeEnabled && serviceFeeMode === 'percent' ? (
<Form.Item
label="比例(%)"
name={['serviceFee', 'percent']}
style={{ marginBottom: 0 }}
>
<InputNumber min={0} max={100} precision={2} style={{ width: '100%' }} />
</Form.Item>
) : null}
{serviceFeeEnabled && serviceFeeMode === 'fixed' ? (
<Form.Item
label="固定金额(元)"
name={['serviceFee', 'amountYuan']}
style={{ marginBottom: 0 }}
>
<InputNumber
min={0}
precision={2}
style={{ width: '100%' }}
addonBefore="¥"
/>
</Form.Item>
) : null}
</div>
</section>
<section className="order-service-section">
<div className="order-service-section-head">
<ConsignmentSectionTitle
index="06"
title="库存数量限制"
description="限制单个打手在售与待审核的寄卖数量"
/>
</div>
<div style={gridStyle}>
<Form.Item
label="开启单人寄售上限"
name={['inventoryLimit', 'enabled']}
valuePropName="checked"
style={{ marginBottom: 0 }}
>
<Switch checkedChildren="开启" unCheckedChildren="关闭" />
</Form.Item>
{inventoryLimitEnabled ? (
<Form.Item
label="最多在售数量"
name={['inventoryLimit', 'maxActiveQuantity']}
style={{ marginBottom: 0 }}
>
<InputNumber
min={0}
precision={0}
style={{ width: '100%' }}
addonAfter="件"
/>
</Form.Item>
) : null}
</div>
</section>
<section className="order-service-section">
<div className="order-service-section-head">
<ConsignmentSectionTitle
index="07"
title="匹配设置"
description="匹配模式决定新单是否进入内部库存匹配队列"
/>
</div>
<div style={gridStyle}>
<Form.Item
label="匹配模式"
name={['matching', 'mode']}
style={{ marginBottom: 0 }}
>
<Select
options={[
{ value: 'off', label: '关闭匹配' },
{ value: 'manual', label: '手动匹配' },
{ value: 'auto', label: '自动匹配' },
]}
/>
</Form.Item>
{matchingMode !== 'off' ? (
<>
<Form.Item
label="仅精确匹配"
name={['matching', 'exactOnly']}
valuePropName="checked"
style={{ marginBottom: 0 }}
>
<Switch checkedChildren="仅精确" unCheckedChildren="允许高配" />
</Form.Item>
<Form.Item
label="低价订单优先"
name={['matching', 'preferLowReward']}
valuePropName="checked"
style={{ marginBottom: 0 }}
>
<Switch checkedChildren="优先" unCheckedChildren="不优先" />
</Form.Item>
<Form.Item
label="内部匹配等待(分钟)"
name={['internalMatch', 'delayMinutes']}
style={{ marginBottom: 0 }}
>
<InputNumber
min={0}
precision={0}
style={{ width: '100%' }}
addonAfter="分钟"
/>
</Form.Item>
<Form.Item
label="超时发回大厅"
name={['internalMatch', 'fallbackToHall']}
valuePropName="checked"
style={{ marginBottom: 0 }}
>
<Switch checkedChildren="是" unCheckedChildren="否" />
</Form.Item>
</>
) : null}
</div>
{matchingMode === 'off' ? (
<Alert
type="warning"
showIcon
style={{ marginTop: 12 }}
message="关闭匹配后:新单直接进入接单大厅,不等待内部库存,也不会自动匹配。"
/>
) : null}
</section>
<section className="order-service-section">
<div className="order-service-section-head">
<ConsignmentSectionTitle
index="08"
title="超时设置"
description="匹配成功进入代练中后的时限与超时处置动作"
/>
</div>
<div style={gridStyle}>
<Form.Item
label="代练超时(小时)"
name={['timeout', 'hours']}
rules={[{ type: 'number', min: 0 }]}
extra="默认 0.5 小时;到点后按下方超时动作处置"
style={{ marginBottom: 0 }}
>
<InputNumber
min={0}
step={0.5}
precision={1}
style={{ width: '100%' }}
addonAfter="小时"
/>
</Form.Item>
<Form.Item
label="超时动作"
name={['timeout', 'policy']}
style={{ marginBottom: 0 }}
>
<Select
options={[
{ value: 'reopen', label: '退回大厅(退还押金)' },
{ value: 'cancel_release', label: '取消并释放押金' },
{ value: 'cancel_deduct', label: '取消并扣除押金' },
{ value: 'rematch_release', label: '重新匹配并退还押金' },
{ value: 'rematch_deduct', label: '重新匹配并扣除押金' },
]}
/>
</Form.Item>
</div>
<Alert
type="info"
showIcon
style={{ marginTop: 12 }}
message="重新匹配:订单回到内部匹配池,并排除原卖家与原库存,避免同一卖家立刻接回同一单。"
/>
</section>
<section className="order-service-section">
<div className="order-service-section-head">
<ConsignmentSectionTitle
index="09"
title="降价提示"
description="寄卖长时间未售出时,在后台给出建议售价(仅提示,不自动改价)"
/>
</div>
<div style={gridStyle}>
<Form.Item
label="开启降价提示"
name={['priceDrop', 'enabled']}
valuePropName="checked"
style={{ marginBottom: 0 }}
>
<Switch checkedChildren="开启" unCheckedChildren="关闭" />
</Form.Item>
{priceDropEnabled ? (
<>
<Form.Item
label="未售出时长(小时)"
name={['priceDrop', 'hours']}
style={{ marginBottom: 0 }}
>
<InputNumber
min={1}
precision={0}
style={{ width: '100%' }}
addonAfter="小时"
/>
</Form.Item>
<Form.Item
label="降幅模式"
name={['priceDrop', 'mode']}
style={{ marginBottom: 0 }}
>
<Select
options={[
{ value: 'percent', label: '按比例 %' },
{ value: 'fixed', label: '固定金额' },
]}
/>
</Form.Item>
<Form.Item
label={priceDropMode === 'fixed' ? '下调金额(元)' : '下调比例(%)'}
name={['priceDrop', 'value']}
style={{ marginBottom: 0 }}
>
<InputNumber
min={0}
max={priceDropMode === 'fixed' ? undefined : 100}
precision={priceDropMode === 'fixed' ? 2 : 0}
style={{ width: '100%' }}
addonBefore={priceDropMode === 'fixed' ? '¥' : undefined}
addonAfter={priceDropMode === 'fixed' ? undefined : '%'}
/>
</Form.Item>
</>
) : null}
</div>
</section>
<section className="order-service-section">
<div className="order-service-section-head">
<ConsignmentSectionTitle
index="10"
title="联系方式与游戏凭据"
description="打手发布页按这里配置的字段动态渲染;字段为空时该模块不显示"
/>
@@ -1668,6 +1246,427 @@ export default function ConsignmentConfigPanel() {
</div>
)}
</section>
<section className="order-service-section">
<div className="order-service-section-head">
<ConsignmentSectionTitle
index="04"
title="价格配置"
description="按接单模板价打折,或按模板价固定下调;没有模板价一律阻止发布"
/>
</div>
<Alert
type="info"
showIcon
message="寄售价始终基于接单模板价计算;该规格没有模板价时,打手端会直接阻止发布。"
style={{ marginBottom: 12 }}
/>
<div style={gridStyle}>
<Form.Item
label="价格类型"
name={['pricing', 'priceType']}
style={{ marginBottom: 0 }}
>
<Radio.Group
optionType="button"
buttonStyle="solid"
options={[
{ value: 'template_discount', label: '接单模板价打折' },
{ value: 'template_minus', label: '模板价固定下调' },
]}
/>
</Form.Item>
{priceType === 'template_minus' ? (
<Form.Item
label="固定下调(元)"
name={['pricing', 'minusYuan']}
rules={[{ type: 'number', min: 0 }]}
extra="售价 = 接单模板价 − 固定下调金额;下调后不足 1 元会被拒绝"
style={{ marginBottom: 0 }}
>
<InputNumber
min={0}
precision={2}
style={{ width: '100%' }}
addonBefore="¥"
/>
</Form.Item>
) : (
<Form.Item
label="模板折扣"
name={['pricing', 'discount']}
rules={[{ type: 'number', min: 0.1, max: 10 }]}
extra="例如 9.5 折 = 接单模板价 × 95%"
style={{ marginBottom: 0 }}
>
<InputNumber
min={0.1}
max={10}
step={0.1}
precision={1}
style={{ width: '100%' }}
addonAfter="折"
/>
</Form.Item>
)}
<Form.Item
label="允许打手改价"
name={['pricing', 'allowWorkerPrice']}
valuePropName="checked"
extra="打手只能按系统建议价往下调"
style={{ marginBottom: 0 }}
>
<Switch checkedChildren="允许" unCheckedChildren="不允许" />
</Form.Item>
<Form.Item
label="最低售价(元)"
name={['pricing', 'minPriceYuan']}
style={{ marginBottom: 0 }}
>
<InputNumber
min={0}
precision={2}
style={{ width: '100%' }}
addonBefore="¥"
/>
</Form.Item>
</div>
</section>
<section className="order-service-section">
<div className="order-service-section-head">
<ConsignmentSectionTitle
index="05"
title="履约保证金"
description="开启后按配置冻结;关闭时使用平台统一发布押金"
/>
</div>
<div style={gridStyle}>
<Form.Item
label="开启保证金"
name={['deposit', 'enabled']}
valuePropName="checked"
style={{ marginBottom: 0 }}
>
<Switch checkedChildren="开启" unCheckedChildren="关闭" />
</Form.Item>
{depositEnabled ? (
<Form.Item
label="保证金模式"
name={['deposit', 'mode']}
style={{ marginBottom: 0 }}
>
<Select
options={[
{ value: 'fixed', label: '固定金额' },
{ value: 'per_quantity', label: '按数量' },
]}
/>
</Form.Item>
) : null}
{depositEnabled && depositMode === 'fixed' ? (
<Form.Item
label="固定金额(元)"
name={['deposit', 'fixedAmountYuan']}
style={{ marginBottom: 0 }}
>
<InputNumber
min={0}
precision={2}
style={{ width: '100%' }}
addonBefore="¥"
/>
</Form.Item>
) : null}
{depositEnabled && depositMode === 'per_quantity' ? (
<Form.Item
label="每件金额(元)"
name={['deposit', 'unitAmountYuan']}
style={{ marginBottom: 0 }}
>
<InputNumber
min={0}
precision={2}
style={{ width: '100%' }}
addonBefore="¥"
/>
</Form.Item>
) : null}
</div>
</section>
<section className="order-service-section">
<div className="order-service-section-head">
<ConsignmentSectionTitle
index="06"
title="服务费"
description="按成交金额比例或固定金额收取"
/>
</div>
<div style={gridStyle}>
<Form.Item
label="开启服务费"
name={['serviceFee', 'enabled']}
valuePropName="checked"
style={{ marginBottom: 0 }}
>
<Switch checkedChildren="开启" unCheckedChildren="关闭" />
</Form.Item>
{serviceFeeEnabled ? (
<Form.Item
label="服务费模式"
name={['serviceFee', 'mode']}
style={{ marginBottom: 0 }}
>
<Select
options={[
{ value: 'percent', label: '按比例 %' },
{ value: 'fixed', label: '固定金额' },
]}
/>
</Form.Item>
) : null}
{serviceFeeEnabled && serviceFeeMode === 'percent' ? (
<Form.Item
label="比例(%)"
name={['serviceFee', 'percent']}
style={{ marginBottom: 0 }}
>
<InputNumber min={0} max={100} precision={2} style={{ width: '100%' }} />
</Form.Item>
) : null}
{serviceFeeEnabled && serviceFeeMode === 'fixed' ? (
<Form.Item
label="固定金额(元)"
name={['serviceFee', 'amountYuan']}
style={{ marginBottom: 0 }}
>
<InputNumber
min={0}
precision={2}
style={{ width: '100%' }}
addonBefore="¥"
/>
</Form.Item>
) : null}
</div>
</section>
<section className="order-service-section">
<div className="order-service-section-head">
<ConsignmentSectionTitle
index="07"
title="库存数量限制"
description="限制单个打手在售与待审核的寄卖数量"
/>
</div>
<div style={gridStyle}>
<Form.Item
label="开启单人寄售上限"
name={['inventoryLimit', 'enabled']}
valuePropName="checked"
style={{ marginBottom: 0 }}
>
<Switch checkedChildren="开启" unCheckedChildren="关闭" />
</Form.Item>
{inventoryLimitEnabled ? (
<Form.Item
label="最多在售数量"
name={['inventoryLimit', 'maxActiveQuantity']}
style={{ marginBottom: 0 }}
>
<InputNumber
min={0}
precision={0}
style={{ width: '100%' }}
addonAfter="件"
/>
</Form.Item>
) : null}
</div>
</section>
<section className="order-service-section">
<div className="order-service-section-head">
<ConsignmentSectionTitle
index="08"
title="匹配设置"
description="匹配模式决定新单是否进入内部库存匹配队列"
/>
</div>
<div style={gridStyle}>
<Form.Item
label="匹配模式"
name={['matching', 'mode']}
style={{ marginBottom: 0 }}
>
<Select
options={[
{ value: 'off', label: '关闭匹配' },
{ value: 'manual', label: '手动匹配' },
{ value: 'auto', label: '自动匹配' },
]}
/>
</Form.Item>
{matchingMode !== 'off' ? (
<>
<Form.Item
label="仅精确匹配"
name={['matching', 'exactOnly']}
valuePropName="checked"
style={{ marginBottom: 0 }}
>
<Switch checkedChildren="仅精确" unCheckedChildren="允许高配" />
</Form.Item>
<Form.Item
label="低价订单优先"
name={['matching', 'preferLowReward']}
valuePropName="checked"
style={{ marginBottom: 0 }}
>
<Switch checkedChildren="优先" unCheckedChildren="不优先" />
</Form.Item>
<Form.Item
label="内部匹配等待(分钟)"
name={['internalMatch', 'delayMinutes']}
style={{ marginBottom: 0 }}
>
<InputNumber
min={0}
precision={0}
style={{ width: '100%' }}
addonAfter="分钟"
/>
</Form.Item>
<Form.Item
label="超时发回大厅"
name={['internalMatch', 'fallbackToHall']}
valuePropName="checked"
style={{ marginBottom: 0 }}
>
<Switch checkedChildren="是" unCheckedChildren="否" />
</Form.Item>
</>
) : null}
</div>
{matchingMode === 'off' ? (
<Alert
type="warning"
showIcon
style={{ marginTop: 12 }}
message="关闭匹配后:新单直接进入接单大厅,不等待内部库存,也不会自动匹配。"
/>
) : null}
</section>
<section className="order-service-section">
<div className="order-service-section-head">
<ConsignmentSectionTitle
index="09"
title="超时设置"
description="匹配成功进入代练中后的时限与超时处置动作"
/>
</div>
<div style={gridStyle}>
<Form.Item
label="代练超时(小时)"
name={['timeout', 'hours']}
rules={[{ type: 'number', min: 0 }]}
extra="默认 0.5 小时;到点后按下方超时动作处置"
style={{ marginBottom: 0 }}
>
<InputNumber
min={0}
step={0.5}
precision={1}
style={{ width: '100%' }}
addonAfter="小时"
/>
</Form.Item>
<Form.Item
label="超时动作"
name={['timeout', 'policy']}
style={{ marginBottom: 0 }}
>
<Select
options={[
{ value: 'reopen', label: '退回大厅(退还押金)' },
{ value: 'cancel_release', label: '取消并释放押金' },
{ value: 'cancel_deduct', label: '取消并扣除押金' },
{ value: 'rematch_release', label: '重新匹配并退还押金' },
{ value: 'rematch_deduct', label: '重新匹配并扣除押金' },
]}
/>
</Form.Item>
</div>
<Alert
type="info"
showIcon
style={{ marginTop: 12 }}
message="重新匹配:订单回到内部匹配池,并排除原卖家与原库存,避免同一卖家立刻接回同一单。"
/>
</section>
<section className="order-service-section">
<div className="order-service-section-head">
<ConsignmentSectionTitle
index="10"
title="降价提示"
description="寄卖长时间未售出时,在后台给出建议售价(仅提示,不自动改价)"
/>
</div>
<div style={gridStyle}>
<Form.Item
label="开启降价提示"
name={['priceDrop', 'enabled']}
valuePropName="checked"
style={{ marginBottom: 0 }}
>
<Switch checkedChildren="开启" unCheckedChildren="关闭" />
</Form.Item>
{priceDropEnabled ? (
<>
<Form.Item
label="未售出时长(小时)"
name={['priceDrop', 'hours']}
style={{ marginBottom: 0 }}
>
<InputNumber
min={1}
precision={0}
style={{ width: '100%' }}
addonAfter="小时"
/>
</Form.Item>
<Form.Item
label="降幅模式"
name={['priceDrop', 'mode']}
style={{ marginBottom: 0 }}
>
<Select
options={[
{ value: 'percent', label: '按比例 %' },
{ value: 'fixed', label: '固定金额' },
]}
/>
</Form.Item>
<Form.Item
label={priceDropMode === 'fixed' ? '下调金额(元)' : '下调比例(%)'}
name={['priceDrop', 'value']}
style={{ marginBottom: 0 }}
>
<InputNumber
min={0}
max={priceDropMode === 'fixed' ? undefined : 100}
precision={priceDropMode === 'fixed' ? 2 : 0}
style={{ width: '100%' }}
addonBefore={priceDropMode === 'fixed' ? '¥' : undefined}
addonAfter={priceDropMode === 'fixed' ? undefined : '%'}
/>
</Form.Item>
</>
) : null}
</div>
</section>
<div className="order-service-save-bar">
<Text type="secondary">保存只更新草稿,发布后才会影响新工单。</Text>