fix(cost-center): 归档已被其他渠道接管的人工商品
This commit is contained in:
@@ -10,6 +10,7 @@ import { ensureVoucherChannelRules } from '../../services/fulfillment/channel-as
|
||||
|
||||
import {
|
||||
archiveHistoricalManualProducts,
|
||||
archiveSupersededManualProducts,
|
||||
backfillAdminNormalizedQuantities,
|
||||
backfillAdminProductMappings,
|
||||
createAdminChannelMapping,
|
||||
@@ -178,6 +179,22 @@ router.post(
|
||||
}),
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/cost-center/products/archive-superseded-manual',
|
||||
requireAdminPermission('finance.config'),
|
||||
createJsonHandler((req) => archiveSupersededManualProducts(bodyOf(req)), {
|
||||
successMessage: '重复人工归一商品已归档',
|
||||
errorMessage: '归档重复人工归一商品失败',
|
||||
scope: '[admin/cost-center/products/archive-superseded-manual]',
|
||||
audit: (_req, data) => ({
|
||||
action: 'cost_superseded_manual_products_archived',
|
||||
targetType: 'product_catalog',
|
||||
targetId: '',
|
||||
data: data as Record<string, unknown>,
|
||||
}),
|
||||
}),
|
||||
)
|
||||
|
||||
router.patch(
|
||||
'/cost-center/products/:productId',
|
||||
requireAdminPermission('finance.config'),
|
||||
|
||||
Reference in New Issue
Block a user