修复:收到订单后按订单级触发自动核销
This commit is contained in:
@@ -37,6 +37,7 @@ const PROVIDER_LABEL: Record<VoucherConsumeProvider, string> = {
|
||||
}
|
||||
|
||||
const CHANNEL_LABEL: Record<VoucherConsumeChannel, string> = {
|
||||
order_received: '订单级触发',
|
||||
affiliate_dash: '自动发货',
|
||||
work_order: '接单工单',
|
||||
manual: '人工客服',
|
||||
@@ -49,6 +50,10 @@ const MODE_OPTIONS: Record<
|
||||
VoucherConsumeChannel,
|
||||
Array<{ value: VoucherConsumeMode; label: string }>
|
||||
> = {
|
||||
order_received: [
|
||||
{ value: 'after_order_received', label: '收到订单后' },
|
||||
{ value: 'manual', label: '人工核销' },
|
||||
],
|
||||
affiliate_dash: [
|
||||
{ value: 'after_order_received', label: '收到订单后' },
|
||||
{ value: 'after_link_generated', label: '领取链接生成后' },
|
||||
@@ -103,6 +108,7 @@ const PROVIDER_FILTER_OPTIONS: Array<{ value: VoucherConsumeProvider; label: str
|
||||
]
|
||||
|
||||
const CHANNEL_FILTER_OPTIONS: Array<{ value: VoucherConsumeChannel; label: string }> = [
|
||||
{ value: 'order_received', label: CHANNEL_LABEL.order_received },
|
||||
{ value: 'affiliate_dash', label: CHANNEL_LABEL.affiliate_dash },
|
||||
{ value: 'work_order', label: CHANNEL_LABEL.work_order },
|
||||
{ value: 'manual', label: CHANNEL_LABEL.manual },
|
||||
@@ -250,7 +256,7 @@ export default function VoucherConsumePolicyPanel() {
|
||||
render: (provider: VoucherConsumeProvider) => PROVIDER_LABEL[provider],
|
||||
},
|
||||
{
|
||||
title: '履约渠道',
|
||||
title: '策略项',
|
||||
dataIndex: 'channel',
|
||||
width: 140,
|
||||
render: (channel: VoucherConsumeChannel) => CHANNEL_LABEL[channel],
|
||||
|
||||
@@ -162,6 +162,7 @@ export type FinancePipelineStatus = {
|
||||
|
||||
export type VoucherConsumeProvider = 'kuaishou_industry' | 'douyin_mashida'
|
||||
export type VoucherConsumeChannel =
|
||||
| 'order_received'
|
||||
| 'affiliate_dash'
|
||||
| 'work_order'
|
||||
| 'manual'
|
||||
|
||||
@@ -22,7 +22,13 @@ test('最近核销任务使用服务端分页', () => {
|
||||
assert.ok(!panel.includes('pagination={false}\n scroll={{ x: 1200 }}'))
|
||||
})
|
||||
|
||||
test('自动核销策略提供未命中履约渠道的平台兜底配置', () => {
|
||||
test('自动核销策略提供独立于履约渠道的订单级触发配置', () => {
|
||||
assert.ok(panel.includes("order_received: '订单级触发'"))
|
||||
assert.ok(panel.includes("value: 'order_received'"))
|
||||
assert.ok(panel.includes("title: '策略项'"))
|
||||
})
|
||||
|
||||
test('旧未命中渠道兜底配置继续保留并兼容', () => {
|
||||
assert.ok(panel.includes("unmatched: '未命中渠道兜底'"))
|
||||
assert.ok(panel.includes("label: '未命中渠道后'"))
|
||||
assert.ok(panel.includes("value: 'unmatched'"))
|
||||
|
||||
Reference in New Issue
Block a user