f
This commit is contained in:
@@ -32,38 +32,12 @@ export function useColumns(): VxeTableGridOptions['columns'] {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'report_commission',
|
field: 'report_commission',
|
||||||
title: '直推报告收益',
|
title: '下级推广收益',
|
||||||
formatter: ({ cellValue }) =>
|
formatter: ({ cellValue }) =>
|
||||||
cellValue !== null && cellValue !== undefined
|
cellValue !== null && cellValue !== undefined
|
||||||
? `¥${cellValue.toFixed(2)}`
|
? `¥${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',
|
field: 'lower_withdraw_reward_ratio',
|
||||||
title: '下级提现奖励比例',
|
title: '下级提现奖励比例',
|
||||||
@@ -73,9 +47,44 @@ export function useColumns(): VxeTableGridOptions['columns'] {
|
|||||||
: '-',
|
: '-',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'create_time',
|
field: 'lower_convert_vip_reward',
|
||||||
title: '创建时间',
|
title: '下级转化VIP奖励',
|
||||||
width: 180,
|
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',
|
align: 'center',
|
||||||
@@ -120,6 +129,12 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
fieldName: 'price',
|
fieldName: 'price',
|
||||||
label: '会员年费',
|
label: '会员年费',
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
|
dependencies: {
|
||||||
|
triggerFields: ['level_name'],
|
||||||
|
componentProps: (values) => ({
|
||||||
|
disabled: values.level_name === 'normal',
|
||||||
|
}),
|
||||||
|
},
|
||||||
componentProps: {
|
componentProps: {
|
||||||
min: 0,
|
min: 0,
|
||||||
precision: 2,
|
precision: 2,
|
||||||
@@ -129,7 +144,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
{
|
{
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
fieldName: 'report_commission',
|
fieldName: 'report_commission',
|
||||||
label: '直推报告收益',
|
label: '下级推广收益',
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
min: 0,
|
min: 0,
|
||||||
@@ -142,6 +157,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
fieldName: 'lower_activity_reward',
|
fieldName: 'lower_activity_reward',
|
||||||
label: '下级活跃奖励',
|
label: '下级活跃奖励',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
disabled: true,
|
||||||
min: 0,
|
min: 0,
|
||||||
precision: 2,
|
precision: 2,
|
||||||
step: 0.01,
|
step: 0.01,
|
||||||
@@ -152,6 +168,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
fieldName: 'new_activity_reward',
|
fieldName: 'new_activity_reward',
|
||||||
label: '新增活跃奖励',
|
label: '新增活跃奖励',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
disabled: true,
|
||||||
min: 0,
|
min: 0,
|
||||||
precision: 2,
|
precision: 2,
|
||||||
step: 0.01,
|
step: 0.01,
|
||||||
@@ -162,6 +179,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
fieldName: 'lower_standard_count',
|
fieldName: 'lower_standard_count',
|
||||||
label: '活跃下级达标数',
|
label: '活跃下级达标数',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
disabled: true,
|
||||||
min: 0,
|
min: 0,
|
||||||
precision: 0,
|
precision: 0,
|
||||||
},
|
},
|
||||||
@@ -171,6 +189,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
fieldName: 'new_lower_standard_count',
|
fieldName: 'new_lower_standard_count',
|
||||||
label: '新增活跃下级达标数',
|
label: '新增活跃下级达标数',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
disabled: true,
|
||||||
min: 0,
|
min: 0,
|
||||||
precision: 0,
|
precision: 0,
|
||||||
},
|
},
|
||||||
@@ -213,6 +232,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '免责金额',
|
label: '免责金额',
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
disabled: true,
|
||||||
min: 0,
|
min: 0,
|
||||||
precision: 2,
|
precision: 2,
|
||||||
step: 0.01,
|
step: 0.01,
|
||||||
|
|||||||
@@ -40,19 +40,6 @@ export function usePlatformDeductionColumns(): VxeTableGridOptions['columns'] {
|
|||||||
return typeMap[cellValue] || cellValue;
|
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: '创建时间',
|
title: '创建时间',
|
||||||
field: 'create_time',
|
field: 'create_time',
|
||||||
@@ -76,18 +63,5 @@ export function usePlatformDeductionFormSchema(): VbenFormSchema[] {
|
|||||||
allowClear: true,
|
allowClear: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
component: 'Select',
|
|
||||||
fieldName: 'status',
|
|
||||||
label: '状态',
|
|
||||||
componentProps: {
|
|
||||||
options: [
|
|
||||||
{ label: '待处理', value: 0 },
|
|
||||||
{ label: '已处理', value: 1 },
|
|
||||||
{ label: '已取消', value: 2 },
|
|
||||||
],
|
|
||||||
allowClear: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,19 @@
|
|||||||
import type { VbenFormSchema } from '#/adapter/form';
|
import type { VbenFormSchema } from '#/adapter/form';
|
||||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
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<string, string>;
|
||||||
|
|
||||||
export function useRewardColumns(): VxeTableGridOptions['columns'] {
|
export function useRewardColumns(): VxeTableGridOptions['columns'] {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
@@ -12,6 +25,7 @@ export function useRewardColumns(): VxeTableGridOptions['columns'] {
|
|||||||
title: '奖励类型',
|
title: '奖励类型',
|
||||||
field: 'type',
|
field: 'type',
|
||||||
width: 120,
|
width: 120,
|
||||||
|
formatter: ({ cellValue }) => rewardTypeMap[cellValue] || cellValue || '-',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '奖励金额',
|
title: '奖励金额',
|
||||||
@@ -56,9 +70,12 @@ export function useRewardFormSchema(): VbenFormSchema[] {
|
|||||||
{
|
{
|
||||||
fieldName: 'type',
|
fieldName: 'type',
|
||||||
label: '奖励类型',
|
label: '奖励类型',
|
||||||
component: 'Input',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入奖励类型',
|
allowClear: true,
|
||||||
|
showSearch: false,
|
||||||
|
placeholder: '请选择奖励类型',
|
||||||
|
options: rewardTypeOptions,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user