feat(consignment): 收敛寄卖迁移并调整发布页价格区布局
- 142–148 收敛为 142_consignment_platform,旧账本自动清理 - 价格三卡保持一行等宽,其余发布页布局回退 - 修复发布 tab 空白并统一价格文案为系统建议价
This commit is contained in:
@@ -1312,7 +1312,7 @@ export default function ConsignmentConfigPanel() {
|
||||
label="允许打手改价"
|
||||
name={['pricing', 'allowWorkerPrice']}
|
||||
valuePropName="checked"
|
||||
extra="打手只能按系统建议价往下调"
|
||||
extra="打手只能按系统建议价格往下调"
|
||||
style={{ marginBottom: 0 }}
|
||||
>
|
||||
<Switch checkedChildren="允许" unCheckedChildren="不允许" />
|
||||
|
||||
@@ -162,7 +162,7 @@ export default function WorkerConsignmentPage() {
|
||||
const [cooldownNow, setCooldownNow] = useState(() => Date.now())
|
||||
const [form] = Form.useForm()
|
||||
const currentDiamondLevel = Form.useWatch('diamondLevel', form)
|
||||
// 寄售价:按后台配置(模板折扣价 / 固定价)自动带出,打手只能往下调。
|
||||
// 寄售价:按后台配置(模板折扣价 / 模板价固定下调)自动带出,打手只能往下调。
|
||||
const [priceState, setPriceState] = useState<
|
||||
| { status: 'idle' }
|
||||
| { status: 'loading' }
|
||||
@@ -740,14 +740,6 @@ export default function WorkerConsignmentPage() {
|
||||
}
|
||||
/>
|
||||
|
||||
{!consignmentContactsQuery.isLoading && contactSupporters.length === 0 ? (
|
||||
<Alert
|
||||
type="warning"
|
||||
showIcon
|
||||
message="暂无可选的对接客服,请联系管理员在「配置 - 对接客服」中添加后再发布"
|
||||
/>
|
||||
) : null}
|
||||
|
||||
<Divider plain className="worker-consignment-divider">
|
||||
规格与价格
|
||||
</Divider>
|
||||
@@ -846,12 +838,16 @@ export default function WorkerConsignmentPage() {
|
||||
})}
|
||||
</div>
|
||||
|
||||
<div className="worker-consignment-price-grid">
|
||||
<div
|
||||
className={`worker-consignment-price-grid${
|
||||
selectedProfile?.config.fields.quantity === false ? ' is-two' : ''
|
||||
}`}
|
||||
>
|
||||
<Form.Item
|
||||
label="寄售价格"
|
||||
tooltip={
|
||||
manualPriceAllowed
|
||||
? `默认按后台配置带出(模板折扣价 / 固定价),可下调,不能高于系统建议价${selectedProfile?.config.pricing.minPriceFen ? `;最低 ¥${(selectedProfile.config.pricing.minPriceFen / 100).toFixed(2)}` : ''}。`
|
||||
? `默认按后台配置带出(模板折扣价 / 模板价固定下调),可下调,不能高于系统建议价${selectedProfile?.config.pricing.minPriceFen ? `;最低 ¥${(selectedProfile.config.pricing.minPriceFen / 100).toFixed(2)}` : ''}。`
|
||||
: '由后台寄卖配置自动带出,卖家不可修改;需要调整请联系客服。'
|
||||
}
|
||||
className="worker-consignment-spec-card is-price"
|
||||
@@ -1126,33 +1122,12 @@ export default function WorkerConsignmentPage() {
|
||||
<Card bordered={false} className="worker-orders-card">
|
||||
<Tabs
|
||||
className="worker-order-tabs"
|
||||
activeKey={
|
||||
activeTab === 'records'
|
||||
? 'records'
|
||||
: selectedProfile
|
||||
? `publish-${selectedProfile.profileId}`
|
||||
: 'publish'
|
||||
}
|
||||
activeKey={activeTab === 'records' ? 'records' : 'publish'}
|
||||
onChange={(key) => {
|
||||
if (key === 'records') {
|
||||
setActiveTab('records')
|
||||
return
|
||||
}
|
||||
const profileId = Number(String(key).replace('publish-', ''))
|
||||
if (Number.isInteger(profileId) && profileId > 0) {
|
||||
if (profileId !== selectedProfileId) {
|
||||
const nextProfile = consignmentProfiles.find((item) => item.profileId === profileId)
|
||||
const nextSpecs = nextProfile?.config.specs ?? []
|
||||
const cleared: Record<string, undefined> = {}
|
||||
for (const field of nextSpecs) cleared[field.key] = undefined
|
||||
cleared.askingPrice = undefined
|
||||
cleared.itemName = undefined
|
||||
form.setFieldsValue(cleared)
|
||||
setPriceState({ status: 'idle' })
|
||||
lastPriceQueryKeyRef.current = ''
|
||||
}
|
||||
setSelectedProfileId(profileId)
|
||||
}
|
||||
setActiveTab('publish')
|
||||
}}
|
||||
items={[
|
||||
|
||||
Reference in New Issue
Block a user