feat(assoc): v4.0.1 合伙人关联码、分佣账单与 H5 用户管理

订单佣金只认关联用户;合伙人备注写入独立表;H5 增加用户管理与首页统计。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-30 14:35:39 +08:00
parent 3b669f7e38
commit 9c8d5f2cad
125 changed files with 6355 additions and 1436 deletions
+6
View File
@@ -183,6 +183,12 @@ export type AdminUserRow = {
benefitUsedAmount?: number;
/** 好客权益·剩余未使用 */
benefitBalance?: number;
assocPartner?: {
id: string;
name: string;
companyName?: string | null;
phone?: string | null;
} | null;
};
export type AdminOrderItem = {
+1
View File
@@ -16,6 +16,7 @@ export const HQ_OPERATION_ACTION_OPTIONS = [
{ value: 'HQ_ACCOUNT_CREATE', label: '新增 HQ 管理员' },
{ value: 'HQ_ACCOUNT_UPDATE', label: '编辑 HQ 管理员' },
{ value: 'HQ_PERMISSION_UPDATE', label: '配置 HQ 权限' },
{ value: 'USER_ASSOC_UPDATE', label: '修改用户关联合伙人' },
{ value: 'USER_DELETE', label: '删除用户' },
{ value: 'USER_BATCH_DELETE', label: '批量删除用户' },
{ value: 'ORDER_SHIP', label: '订单发货' },
@@ -0,0 +1,9 @@
/** 表单选填项常为 null,PUT 时去掉以免后端对 null 调 trim */
export function omitNullFields<T extends Record<string, unknown>>(input: T): Partial<T> {
const out: Partial<T> = {};
for (const [key, value] of Object.entries(input)) {
if (value === null || value === undefined) continue;
(out as Record<string, unknown>)[key] = value;
}
return out;
}