删除门店的多银行账户列表

This commit is contained in:
2026-09-08 14:23:00 +08:00
parent 253430b291
commit 8f25f823d5
22 changed files with 214 additions and 902 deletions
+41 -13
View File
@@ -1,4 +1,5 @@
import { useEffect, useMemo, useState } from 'react';
import { useNavigate } from 'react-router-dom';
import {
Button,
Form,
@@ -24,6 +25,7 @@ import { downloadBase64File } from '../lib/exportExcel';
import { useAdminList } from '../lib/useAdminList';
import { useAdminListColumns } from '../lib/useAdminListColumns';
import { AdminListHeader } from '../components/AdminListHeader';
import { AdminPrimaryLink } from '../components/AdminPrimaryLink';
type CityOption = { id: string; name: string };
@@ -55,6 +57,7 @@ function otherNumericId(id: string) {
}
export default function BankAccountsPage() {
const navigate = useNavigate();
const [filterForm] = Form.useForm<{
type?: FinanceBankAccountType;
cityId?: string;
@@ -198,17 +201,42 @@ export default function BankAccountsPage() {
<Tag color={TYPE_COLORS[type]}>{FINANCE_BANK_ACCOUNT_TYPE_LABELS[type]}</Tag>
),
},
{ title: '归属', dataIndex: 'ownerName', width: 180 },
{ title: '城市', dataIndex: 'cityName', width: 100, render: (v?: string | null) => v || '—' },
{ title: '户名', dataIndex: 'bankAccountName', width: 140 },
{ title: '银行账号', dataIndex: 'bankAccountNo', width: 180 },
{ title: '开户行', dataIndex: 'bankBranch', width: 180, render: (v?: string | null) => v || '—' },
{
title: '默认',
dataIndex: 'isDefault',
width: 72,
render: (v: boolean | undefined, row) => (row.type === 'STORE' ? (v ? '是' : '否') : '—'),
title: '归属',
dataIndex: 'ownerName',
width: 180,
render: (name: string, row) => (
<AdminPrimaryLink
onClick={() => {
if (row.type === 'STORE' && row.ownerId) {
navigate(`/stores?storeId=${encodeURIComponent(row.ownerId)}&tab=settlement`);
return;
}
if (row.type === 'WINERY') {
navigate('/system-settings?group=winery_bank');
return;
}
if (row.type === 'PARTNER' && row.ownerId) {
navigate(`/city-partners?partnerId=${encodeURIComponent(row.ownerId)}`);
return;
}
if (row.type === 'LOGISTICS' && row.ownerId) {
navigate(`/fulfillment-providers?id=${encodeURIComponent(row.ownerId)}`);
return;
}
if (row.type === 'OTHER') {
openEdit(row);
}
}}
>
{name}
</AdminPrimaryLink>
),
},
{ title: '城市', dataIndex: 'cityName', width: 100, render: (v?: string | null) => v || '—' },
{ title: '结算户名', dataIndex: 'bankAccountName', width: 140 },
{ title: '银行账号', dataIndex: 'bankAccountNo', width: 180 },
{ title: '开户银行', dataIndex: 'bankBranch', width: 180, render: (v?: string | null) => v || '—' },
{ title: '备注', dataIndex: 'remark', width: 200, render: (v?: string | null) => v || '—' },
{
title: '操作',
@@ -251,8 +279,8 @@ export default function BankAccountsPage() {
<div>
{settingsModal}
<AdminListHeader
title="银行账户"
description="汇总门店、酒厂、合伙人、物流的有效收款账户;可登记不挂门店的其他账户。打款仍以各业务源账户为准。"
title="全部银行账户"
description="汇总门店结算资质、酒厂、合伙人、物流的有效银行账户;可登记不挂门店的其他账户。打款仍以各业务源账户为准。"
settings={settingsButton}
actions={
<Button type="primary" onClick={openCreate}>
@@ -287,7 +315,7 @@ export default function BankAccountsPage() {
/>
</Form.Item>
<Form.Item name="keyword" label="查找">
<Input allowClear style={{ width: 220 }} placeholder="户名 / 账号 / 开户行 / 归属 / 备注" />
<Input allowClear style={{ width: 220 }} placeholder="户名 / 账号 / 开户行 / 归属 / 备注" />
</Form.Item>
<Form.Item>
<Button type="primary" htmlType="submit">
@@ -361,7 +389,7 @@ export default function BankAccountsPage() {
>
<Input maxLength={32} />
</Form.Item>
<Form.Item name="bankBranch" label="开户行">
<Form.Item name="bankBranch" label="开户行">
<Input maxLength={128} />
</Form.Item>
<Form.Item name="remark" label="备注">