优化分红方式

This commit is contained in:
2026-04-17 16:46:38 +08:00
parent 2e0bcd3f23
commit 9954ea741b
15 changed files with 677 additions and 373 deletions

View File

@@ -40,13 +40,6 @@ optButtons[1].display = (row) => {
return row.id != adminInfo.id
}
const formatRatePercent = (_row: any, _column: any, cellValue: number | string | null) => {
if (cellValue === null || cellValue === undefined || cellValue === '') return '--'
const num = Number(cellValue)
if (Number.isNaN(num)) return '--'
return `${num.toFixed(2)}%`
}
const baTable = new baTableClass(
new baTableApi('/admin/auth.Admin/'),
{
@@ -64,14 +57,6 @@ const baTable = new baTableClass(
render: 'tags',
},
{ label: t('auth.admin.invite_code'), prop: 'invite_code', align: 'center', operator: 'LIKE', operatorPlaceholder: t('Fuzzy query') },
{
label: t('auth.admin.commission_rate'),
prop: 'commission_rate',
align: 'center',
minWidth: 90,
operator: 'RANGE',
formatter: formatRatePercent,
},
{ label: t('auth.admin.avatar'), prop: 'avatar', align: 'center', render: 'image', operator: false },
{ label: t('auth.admin.email'), prop: 'email', align: 'center', operator: 'LIKE', operatorPlaceholder: t('Fuzzy query') },
{ label: t('auth.admin.mobile'), prop: 'mobile', align: 'center', operator: 'LIKE', operatorPlaceholder: t('Fuzzy query') },