diff --git a/apps/bdrp-admin-web/src/views/agent/agent-membership-config/data.ts b/apps/bdrp-admin-web/src/views/agent/agent-membership-config/data.ts index f891e9a..9d6cadc 100644 --- a/apps/bdrp-admin-web/src/views/agent/agent-membership-config/data.ts +++ b/apps/bdrp-admin-web/src/views/agent/agent-membership-config/data.ts @@ -32,38 +32,12 @@ export function useColumns(): VxeTableGridOptions['columns'] { }, { field: 'report_commission', - title: '直推报告收益', + title: '下级推广收益', formatter: ({ cellValue }) => cellValue !== null && cellValue !== undefined ? `¥${cellValue.toFixed(2)}` : '-', }, - { - field: 'lower_activity_reward', - title: '下级活跃奖励', - formatter: ({ cellValue }) => - cellValue !== null && cellValue !== undefined - ? `¥${cellValue.toFixed(2)}` - : '-', - }, - { - field: 'new_activity_reward', - title: '新增活跃奖励', - formatter: ({ cellValue }) => - cellValue !== null && cellValue !== undefined - ? `¥${cellValue.toFixed(2)}` - : '-', - }, - { - field: 'lower_standard_count', - title: '活跃下级达标数', - formatter: ({ cellValue }) => cellValue ?? '-', - }, - { - field: 'new_lower_standard_count', - title: '新增活跃下级达标数', - formatter: ({ cellValue }) => cellValue ?? '-', - }, { field: 'lower_withdraw_reward_ratio', title: '下级提现奖励比例', @@ -73,9 +47,44 @@ export function useColumns(): VxeTableGridOptions['columns'] { : '-', }, { - field: 'create_time', - title: '创建时间', - width: 180, + field: 'lower_convert_vip_reward', + title: '下级转化VIP奖励', + formatter: ({ cellValue }) => + cellValue !== null && cellValue !== undefined + ? `¥${cellValue.toFixed(2)}` + : '-', + }, + { + field: 'lower_convert_svip_reward', + title: '下级转化SVIP奖励', + formatter: ({ cellValue }) => + cellValue !== null && cellValue !== undefined + ? `¥${cellValue.toFixed(2)}` + : '-', + }, + { + field: 'price_increase_max', + title: '提价最高金额', + formatter: ({ cellValue }) => + cellValue !== null && cellValue !== undefined + ? `¥${cellValue.toFixed(2)}` + : '-', + }, + { + field: 'price_ratio', + title: '提价区间收取比例', + formatter: ({ cellValue }) => + cellValue !== null && cellValue !== undefined + ? `${(cellValue * 100).toFixed(2)}%` + : '-', + }, + { + field: 'price_increase_amount', + title: '加价金额', + formatter: ({ cellValue }) => + cellValue !== null && cellValue !== undefined + ? `¥${cellValue.toFixed(2)}` + : '-', }, { align: 'center', @@ -120,6 +129,12 @@ export function useFormSchema(): VbenFormSchema[] { fieldName: 'price', label: '会员年费', rules: 'required', + dependencies: { + triggerFields: ['level_name'], + componentProps: (values) => ({ + disabled: values.level_name === 'normal', + }), + }, componentProps: { min: 0, precision: 2, @@ -129,7 +144,7 @@ export function useFormSchema(): VbenFormSchema[] { { component: 'InputNumber', fieldName: 'report_commission', - label: '直推报告收益', + label: '下级推广收益', rules: 'required', componentProps: { min: 0, @@ -142,6 +157,7 @@ export function useFormSchema(): VbenFormSchema[] { fieldName: 'lower_activity_reward', label: '下级活跃奖励', componentProps: { + disabled: true, min: 0, precision: 2, step: 0.01, @@ -152,6 +168,7 @@ export function useFormSchema(): VbenFormSchema[] { fieldName: 'new_activity_reward', label: '新增活跃奖励', componentProps: { + disabled: true, min: 0, precision: 2, step: 0.01, @@ -162,6 +179,7 @@ export function useFormSchema(): VbenFormSchema[] { fieldName: 'lower_standard_count', label: '活跃下级达标数', componentProps: { + disabled: true, min: 0, precision: 0, }, @@ -171,6 +189,7 @@ export function useFormSchema(): VbenFormSchema[] { fieldName: 'new_lower_standard_count', label: '新增活跃下级达标数', componentProps: { + disabled: true, min: 0, precision: 0, }, @@ -213,6 +232,7 @@ export function useFormSchema(): VbenFormSchema[] { label: '免责金额', rules: 'required', componentProps: { + disabled: true, min: 0, precision: 2, step: 0.01, diff --git a/apps/bdrp-admin-web/src/views/agent/agent-platform-deduction/data.ts b/apps/bdrp-admin-web/src/views/agent/agent-platform-deduction/data.ts index 2b99e43..ccbac74 100644 --- a/apps/bdrp-admin-web/src/views/agent/agent-platform-deduction/data.ts +++ b/apps/bdrp-admin-web/src/views/agent/agent-platform-deduction/data.ts @@ -40,19 +40,6 @@ export function usePlatformDeductionColumns(): VxeTableGridOptions['columns'] { return typeMap[cellValue] || cellValue; }, }, - { - title: '状态', - field: 'status', - width: 100, - cellRender: { - name: 'CellTag', - options: [ - { value: 0, color: 'warning', label: '待处理' }, - { value: 1, color: 'success', label: '已处理' }, - { value: 2, color: 'error', label: '已取消' }, - ], - }, - }, { title: '创建时间', field: 'create_time', @@ -76,18 +63,5 @@ export function usePlatformDeductionFormSchema(): VbenFormSchema[] { allowClear: true, }, }, - { - component: 'Select', - fieldName: 'status', - label: '状态', - componentProps: { - options: [ - { label: '待处理', value: 0 }, - { label: '已处理', value: 1 }, - { label: '已取消', value: 2 }, - ], - allowClear: true, - }, - }, ]; } diff --git a/apps/bdrp-admin-web/src/views/agent/agent-reward/data.ts b/apps/bdrp-admin-web/src/views/agent/agent-reward/data.ts index 2ce48b2..957e43b 100644 --- a/apps/bdrp-admin-web/src/views/agent/agent-reward/data.ts +++ b/apps/bdrp-admin-web/src/views/agent/agent-reward/data.ts @@ -1,6 +1,19 @@ import type { VbenFormSchema } from '#/adapter/form'; import type { VxeTableGridOptions } from '#/adapter/vxe-table'; +const rewardTypeOptions = [ + { label: '下级推广奖励', value: 'descendant_promotion' }, + { label: '下级升级VIP奖励', value: 'descendant_upgrade_vip' }, + { label: '下级升级SVIP奖励', value: 'descendant_upgrade_svip' }, + { label: '下级保持活跃奖励', value: 'descendant_stay_active' }, + { label: '下级新增活跃奖励', value: 'descendant_new_active' }, + { label: '下级提现收益', value: 'descendant_withdraw' }, +]; + +const rewardTypeMap = Object.fromEntries( + rewardTypeOptions.map((item) => [item.value, item.label]), +) as Record; + export function useRewardColumns(): VxeTableGridOptions['columns'] { return [ { @@ -12,6 +25,7 @@ export function useRewardColumns(): VxeTableGridOptions['columns'] { title: '奖励类型', field: 'type', width: 120, + formatter: ({ cellValue }) => rewardTypeMap[cellValue] || cellValue || '-', }, { title: '奖励金额', @@ -56,9 +70,12 @@ export function useRewardFormSchema(): VbenFormSchema[] { { fieldName: 'type', label: '奖励类型', - component: 'Input', + component: 'Select', componentProps: { - placeholder: '请输入奖励类型', + allowClear: true, + showSearch: false, + placeholder: '请选择奖励类型', + options: rewardTypeOptions, }, }, ];