feat(cost-center): 统一接单模板成本并自动同步商品

This commit is contained in:
yml2213
2026-11-02 16:14:51 +08:00
parent 55e3c4e21b
commit 290890e848
22 changed files with 963 additions and 508 deletions
@@ -64,17 +64,6 @@ export function applyAdminTemplateProductBootstrap(payload?: {
)
}
export function syncAdminWorkOrderTemplateCostVersions() {
return apiPost<{
ruleCount: number
unitPriceRuleCount: number
activeVersionCount: number
createdCount: number
retiredCount: number
linkedSnapshotCount: number
}>('/api/v1/admin/cost-center/work-order-template-costs/sync')
}
export function backfillAdminWorkOrderProductSkus(payload?: {
dateFrom?: string
dateTo?: string
@@ -493,6 +482,7 @@ export function setAdminProductPrice(
productId: number,
payload: {
amountFen: number
pricingMode?: 'fixed' | 'unit'
effectiveFrom?: string
changeReason?: string
syncOpenOrders?: boolean
@@ -503,6 +493,7 @@ export function setAdminProductPrice(
costVersionId: number
amountFen: number
effectiveFrom: string
pricingMode?: 'fixed' | 'unit'
syncedOrders?: {
candidateCount: number
updatedCount: number