fix(ui): 完善界面交互与开发配置
This commit is contained in:
@@ -38,6 +38,15 @@ import {
|
||||
partnerWorkspaceFallback,
|
||||
} from '../PartnerPortal/redirect';
|
||||
import Loading from '../../components/common/ui/Loading';
|
||||
import OrgPageHeader from '../Organization/components/OrgPageHeader';
|
||||
import { useCommissionThemeStyle } from './commissionTheme';
|
||||
import { Table } from '@/components/ui';
|
||||
import {
|
||||
ConsoleAlert as Alert,
|
||||
ConsoleCard as Card,
|
||||
ConsoleModal as Modal,
|
||||
ConsoleTabs as Tabs,
|
||||
} from '../../components/console/ConsolePrimitives';
|
||||
import {
|
||||
Home,
|
||||
Users,
|
||||
@@ -57,17 +66,12 @@ import PartnerPortal from './PartnerPortal';
|
||||
import { partnerScope, createPartnerTransport } from './partnerScope';
|
||||
import { tierStatus } from './listFilters';
|
||||
import {
|
||||
Alert,
|
||||
Button,
|
||||
Card,
|
||||
DatePicker,
|
||||
Dropdown,
|
||||
Empty,
|
||||
Modal,
|
||||
Select,
|
||||
Spin,
|
||||
Table,
|
||||
Tabs,
|
||||
Tag,
|
||||
Typography,
|
||||
} from 'antd';
|
||||
@@ -237,7 +241,7 @@ function PaymentTable({ payments, admin = false }) {
|
||||
rowKey='id'
|
||||
dataSource={payments}
|
||||
pagination={false}
|
||||
locale={{ emptyText: emptyState(t('暂无付款记录')) }}
|
||||
empty={emptyState(t('暂无付款记录'))}
|
||||
columns={[
|
||||
{ title: t('打款日期'), dataIndex: 'paid_at', render: formatDateTime },
|
||||
{ title: t('实付金额'), dataIndex: 'amount_uyuan', render: money },
|
||||
@@ -448,7 +452,7 @@ function AdminStatementDetail({
|
||||
pageSize: 10,
|
||||
}}
|
||||
scroll={{ x: 1800 }}
|
||||
locale={{ emptyText: emptyState(t('暂无计费明细')) }}
|
||||
empty={emptyState(t('暂无计费明细'))}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
@@ -463,7 +467,7 @@ function AdminStatementDetail({
|
||||
rowKey='id'
|
||||
dataSource={operations}
|
||||
pagination={false}
|
||||
locale={{ emptyText: emptyState(t('暂无操作记录')) }}
|
||||
empty={emptyState(t('暂无操作记录'))}
|
||||
columns={[
|
||||
{
|
||||
title: t('操作'),
|
||||
@@ -519,7 +523,7 @@ function AdminStatementDetail({
|
||||
rowKey='id'
|
||||
dataSource={adjustments}
|
||||
pagination={false}
|
||||
locale={{ emptyText: emptyState(t('暂无调整单')) }}
|
||||
empty={emptyState(t('暂无调整单'))}
|
||||
columns={[
|
||||
...AdjustmentColumns(t, money),
|
||||
{ title: t('状态'), dataIndex: 'status', render: tag },
|
||||
@@ -565,6 +569,7 @@ function AdminStatementDetail({
|
||||
);
|
||||
}
|
||||
function AdminPage() {
|
||||
const themeStyle = useCommissionThemeStyle();
|
||||
const [userState] = useContext(UserContext);
|
||||
const { t } = useTranslation();
|
||||
const location = useLocation();
|
||||
@@ -1531,7 +1536,10 @@ function AdminPage() {
|
||||
/>
|
||||
);
|
||||
return (
|
||||
<div className='commission-v2 commission-admin-workspace'>
|
||||
<div
|
||||
className='commission-v2 commission-admin-workspace'
|
||||
style={themeStyle}
|
||||
>
|
||||
<div className='commission-admin-main'>
|
||||
<header className='commission-workspace-bar'>
|
||||
<span>
|
||||
@@ -1849,6 +1857,7 @@ export function PartnerWorkspace({ organizationId = null }) {
|
||||
}
|
||||
|
||||
function ScopedPartnerWorkspace({ scope, isCurrent }) {
|
||||
const themeStyle = useCommissionThemeStyle();
|
||||
const [userState] = useContext(UserContext);
|
||||
const { t } = useTranslation();
|
||||
const { status, partnerType, retry } = usePartnerWorkspaceAccess(
|
||||
@@ -1874,11 +1883,13 @@ function ScopedPartnerWorkspace({ scope, isCurrent }) {
|
||||
return <Navigate to={COMPANY_PARTNER_WORKSPACE_PATH} replace />;
|
||||
if (status === 'denied')
|
||||
return scope.enterprise ? (
|
||||
<Alert
|
||||
type='warning'
|
||||
showIcon
|
||||
title={t('当前企业没有可用的分佣访问权限')}
|
||||
/>
|
||||
<div
|
||||
className='uc-page oc-page commission-access-state'
|
||||
style={themeStyle}
|
||||
>
|
||||
<OrgPageHeader title={t('企业分佣')} />
|
||||
<Alert type='warning' title={t('当前企业没有可用的分佣访问权限')} />
|
||||
</div>
|
||||
) : (
|
||||
<Navigate to={partnerWorkspaceFallback(userState?.user?.role)} replace />
|
||||
);
|
||||
@@ -1904,6 +1915,7 @@ function ScopedPartnerWorkspace({ scope, isCurrent }) {
|
||||
return (
|
||||
<div
|
||||
data-partner-scope={scope.key}
|
||||
style={themeStyle}
|
||||
className={
|
||||
scope.enterprise ? 'partner-portal-scope--embedded' : undefined
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user