统一前后端代码格式化配置
This commit is contained in:
@@ -76,12 +76,14 @@ import type {
|
||||
WorkerLevel,
|
||||
WorkerUser,
|
||||
} from '@/types/worker-platform'
|
||||
import {
|
||||
ADMIN_DEFAULT_PAGE_SIZE,
|
||||
buildAdminTablePagination,
|
||||
} from '@/utils/admin-pagination'
|
||||
import { ADMIN_DEFAULT_PAGE_SIZE, buildAdminTablePagination } from '@/utils/admin-pagination'
|
||||
import { formatAdminDateTime } from '@/utils/admin-time'
|
||||
import { asRecord, formatMoney, formatSharingShareStatus, resolveSharingShareStatusColor } from './shared'
|
||||
import {
|
||||
asRecord,
|
||||
formatMoney,
|
||||
formatSharingShareStatus,
|
||||
resolveSharingShareStatusColor,
|
||||
} from './shared'
|
||||
type FinanceConfigFormValues = {
|
||||
depositUnfreezeDays?: number
|
||||
recharge?: {
|
||||
@@ -230,9 +232,7 @@ export default function FinancePanel() {
|
||||
<Typography.Text strong>
|
||||
{row.worker?.displayName || row.worker?.username || '-'}
|
||||
</Typography.Text>
|
||||
<Typography.Text type="secondary">
|
||||
{row.worker?.username || '-'}
|
||||
</Typography.Text>
|
||||
<Typography.Text type="secondary">{row.worker?.username || '-'}</Typography.Text>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
@@ -272,9 +272,7 @@ export default function FinancePanel() {
|
||||
<div className="cell-stack">
|
||||
<Typography.Text>{row.note || '-'}</Typography.Text>
|
||||
{row.reviewedNote ? (
|
||||
<Typography.Text type="secondary">
|
||||
审核备注:{row.reviewedNote}
|
||||
</Typography.Text>
|
||||
<Typography.Text type="secondary">审核备注:{row.reviewedNote}</Typography.Text>
|
||||
) : null}
|
||||
</div>
|
||||
),
|
||||
@@ -350,11 +348,7 @@ export default function FinancePanel() {
|
||||
initialValues={mapFinanceConfigToFormValues()}
|
||||
>
|
||||
<Card title="充值入口" size="small" style={{ marginBottom: 16 }}>
|
||||
<Form.Item
|
||||
label="开启充值申请"
|
||||
name={['recharge', 'enabled']}
|
||||
valuePropName="checked"
|
||||
>
|
||||
<Form.Item label="开启充值申请" name={['recharge', 'enabled']} valuePropName="checked">
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
<Form.Item label="收款通道名称" name={['recharge', 'channelName']}>
|
||||
@@ -378,10 +372,7 @@ export default function FinancePanel() {
|
||||
</Card>
|
||||
|
||||
<Card title="管理员联系" size="small" style={{ marginBottom: 16 }}>
|
||||
<Form.Item
|
||||
label="管理员微信二维码"
|
||||
name={['adminContact', 'wechatQrCodeImageList']}
|
||||
>
|
||||
<Form.Item label="管理员微信二维码" name={['adminContact', 'wechatQrCodeImageList']}>
|
||||
<ImageUpload scene="worker-admin-contact" scope="admin" maxCount={1} />
|
||||
</Form.Item>
|
||||
</Card>
|
||||
@@ -400,11 +391,7 @@ export default function FinancePanel() {
|
||||
</Card>
|
||||
|
||||
<Card title="提现入口" size="small" style={{ marginBottom: 16 }}>
|
||||
<Form.Item
|
||||
label="开启提现申请"
|
||||
name={['withdraw', 'enabled']}
|
||||
valuePropName="checked"
|
||||
>
|
||||
<Form.Item label="开启提现申请" name={['withdraw', 'enabled']} valuePropName="checked">
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
<Form.Item label="提现说明" name={['withdraw', 'instructions']}>
|
||||
@@ -494,7 +481,9 @@ export default function FinancePanel() {
|
||||
</Card>
|
||||
|
||||
<Modal
|
||||
title={reviewState ? `${formatFinanceReviewAction(reviewState.action)}资金申请` : '处理资金申请'}
|
||||
title={
|
||||
reviewState ? `${formatFinanceReviewAction(reviewState.action)}资金申请` : '处理资金申请'
|
||||
}
|
||||
open={Boolean(reviewState)}
|
||||
destroyOnHidden
|
||||
confirmLoading={reviewing}
|
||||
@@ -553,9 +542,7 @@ export default function FinancePanel() {
|
||||
)
|
||||
}
|
||||
|
||||
function mapFinanceConfigToFormValues(
|
||||
config?: WorkerFinanceConfig,
|
||||
): FinanceConfigFormValues {
|
||||
function mapFinanceConfigToFormValues(config?: WorkerFinanceConfig): FinanceConfigFormValues {
|
||||
return {
|
||||
depositUnfreezeDays: Number(config?.depositUnfreezeDays ?? 3),
|
||||
recharge: {
|
||||
@@ -613,9 +600,7 @@ function renderFinanceRequestAccount(request: WorkerFinanceRequest) {
|
||||
<div className="cell-stack">
|
||||
<Typography.Text>{renderFinanceRequestAccountText(request)}</Typography.Text>
|
||||
{request.requestType === 'withdraw' && request.accountNo ? (
|
||||
<Typography.Text type="secondary">
|
||||
{maskFinanceAccount(request.accountNo)}
|
||||
</Typography.Text>
|
||||
<Typography.Text type="secondary">{maskFinanceAccount(request.accountNo)}</Typography.Text>
|
||||
) : null}
|
||||
</div>
|
||||
)
|
||||
@@ -629,11 +614,7 @@ function renderFinanceRequestAccountText(request: WorkerFinanceRequest) {
|
||||
}
|
||||
|
||||
const rechargeSnapshot = getRechargeSnapshot(request)
|
||||
if (
|
||||
rechargeSnapshot.channelName ||
|
||||
rechargeSnapshot.accountName ||
|
||||
rechargeSnapshot.accountNo
|
||||
) {
|
||||
if (rechargeSnapshot.channelName || rechargeSnapshot.accountName || rechargeSnapshot.accountNo) {
|
||||
return [
|
||||
rechargeSnapshot.channelName,
|
||||
rechargeSnapshot.accountName,
|
||||
|
||||
Reference in New Issue
Block a user