feat(settlement): 门店未出账手动提现与总部审核(OPT-010)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-03 15:32:01 +08:00
parent 666bcb8633
commit f3353bbce5
29 changed files with 1733 additions and 15 deletions
@@ -32,6 +32,7 @@ export const HQ_PERMISSION_CATALOG = [
{ key: 'system_settings_app', label: '应用链接', group: '系统设置' },
{ key: 'system_settings_deploy', label: '发布部署', group: '系统设置' },
{ key: 'system_settings_winery_bank', label: '酒厂银行账户', group: '系统设置' },
{ key: 'system_settings_finance', label: '财务结算', group: '系统设置' },
] as const;
export type HqPermissionKey = (typeof HQ_PERMISSION_CATALOG)[number]['key'];
@@ -61,6 +62,7 @@ export const SYSTEM_CONFIG_GROUP_PERMISSION: Record<string, HqPermissionKey> = {
app: 'system_settings_app',
deploy: 'system_settings_deploy',
winery_bank: 'system_settings_winery_bank',
finance: 'system_settings_finance',
};
export const SYSTEM_SETTINGS_PERMISSION_KEYS = Object.values(
@@ -127,6 +129,7 @@ export const HQ_ROLE_DEFAULT_PERMISSIONS: Record<string, HqPermissionKey[]> = {
'invoices',
'logs',
'system_settings_winery_bank',
'system_settings_finance',
],
CUSTOMER_SERVICE: [
'dashboard',
+44
View File
@@ -1,5 +1,49 @@
export type FinancePayStatus = 'UNPAID' | 'PAID';
/** 门店未出账提现单日上限默认值(FIN-002,可配置) */
export const DEFAULT_STORE_WITHDRAW_DAILY_LIMIT = 5000;
export type StoreWithdrawStatus = 'PENDING_REVIEW' | 'REJECTED' | 'PAID';
export const STORE_WITHDRAW_STATUS_LABELS: Record<StoreWithdrawStatus, string> = {
PENDING_REVIEW: '待审核',
REJECTED: '已驳回',
PAID: '已结算',
};
export interface StoreWithdrawBankAccountDto {
bankAccountName?: string | null;
bankAccountNo?: string | null;
bankBranch?: string | null;
}
export interface StoreWithdrawSummaryDto {
availableAmount: number;
pendingReviewAmount: number;
todayAppliedAmount: number;
dailyLimit: number;
remainingDailyLimit: number;
whitelistEnabled: boolean;
isPrimary: boolean;
hasBankAccount: boolean;
hasPendingRequest: boolean;
bankAccount?: StoreWithdrawBankAccountDto | null;
}
export interface StoreWithdrawRequestDto {
id: string;
withdrawNo: string;
storeId: string;
amount: number;
payoutCount: number;
status: StoreWithdrawStatus;
rejectReason?: string | null;
appliedAt: string;
reviewedAt?: string | null;
paidAt?: string | null;
paymentRef?: string | null;
}
export interface StorePayoutDto {
id: string;
redeemAmount: number;