feat(fulfillment): 增加统一结算与多渠道人工履约

This commit is contained in:
yml2213
2026-11-05 16:14:56 +08:00
parent 548070c2ad
commit 4e83dbb84c
43 changed files with 1582 additions and 334 deletions
+3
View File
@@ -225,6 +225,7 @@ export function resolveOrderFulfillmentMode(row: {
| 'affiliate_dash'
| 'third_party_voucher'
| 'manual'
| 'on_account'
| 'pending'
| 'archived'
| 'mixed'
@@ -240,6 +241,8 @@ export function resolveOrderFulfillmentMode(row: {
return { label: '🗄 历史归档', color: 'default' }
case 'manual':
return { label: '🙋 人工履约', color: 'orange' }
case 'on_account':
return { label: '统一结算', color: 'gold' }
case 'mixed':
return { label: '🔀 混合履约', color: 'geekblue' }
default:
+1
View File
@@ -34,6 +34,7 @@ export const adminOrderFulfillmentModeOptions = [
{ label: '接单平台', value: 'work_order' },
{ label: '第三方卡券', value: 'third_party_voucher' },
{ label: '人工履约', value: 'manual' },
{ label: '统一结算', value: 'on_account' },
{ label: '混合履约', value: 'mixed' },
{ label: '待判定', value: 'pending' },
{ label: '历史归档', value: 'archived' },
@@ -0,0 +1,16 @@
/** 分 → 元,用于统一展示积分换算率。 */
export function formatCreditUnitPriceYuan(value: number | string | null | undefined) {
const fen = Number(value)
return `${(Number.isFinite(fen) ? fen / 100 : 0).toFixed(2)}元`
}
export function formatCreditUnitPriceLabel(value: number | string | null | undefined) {
return `1积分=${formatCreditUnitPriceYuan(value)}`
}
/** 配置金额最多 2 位小数,去掉无意义的尾随 0。 */
export function formatCreditQuantity(value: number | string | null | undefined) {
const quantity = Number(value)
if (!Number.isFinite(quantity)) return '0'
return String(Number(quantity.toFixed(2)))
}