feat(ops): v4.0.4 开发任务多行与版本状态同步、合伙人/门店删除、账单合伙人列

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-31 16:08:55 +08:00
parent e26206b93c
commit ac94f5f5de
15 changed files with 568 additions and 59 deletions
+42 -1
View File
@@ -12,6 +12,7 @@ import {
Input,
InputNumber,
Modal,
Popconfirm,
Select,
Space,
Steps,
@@ -302,6 +303,7 @@ export default function StoresPage() {
const [categoryTree, setCategoryTree] = useState<CategoryNode[]>([]);
const [optionsLoading, setOptionsLoading] = useState(false);
const [saving, setSaving] = useState(false);
const [deleting, setDeleting] = useState(false);
const [phoneMismatch, setPhoneMismatch] = useState<string | null>(null);
const deepLinkStoreOpenedRef = useRef(false);
@@ -372,6 +374,23 @@ export default function StoresPage() {
.map((n) => ({ value: n.id, label: n.name }));
}, [categoryTree, editCategoryParentId]);
async function deleteStore(id: string) {
setDeleting(true);
try {
await request(`/admin/stores/${id}`, { method: 'DELETE' });
message.success('门店及门店账号已删除');
if (detail && String(detail.id) === id) {
setDrawerOpen(false);
setDetail(null);
}
void reload();
} catch (e) {
message.error(e instanceof Error ? e.message : '删除失败');
} finally {
setDeleting(false);
}
}
async function openStoreDetail(row: StoreRow, opts?: { tab?: string }) {
const [d, cats] = await Promise.all([
request<Record<string, unknown>>(`/admin/stores/${row.id}`),
@@ -821,7 +840,7 @@ export default function StoresPage() {
{
key: 'actions',
title: '操作',
width: 280,
width: 320,
fixed: 'right',
render: (_, row) => (
<Space size={0} wrap>
@@ -861,6 +880,17 @@ export default function StoresPage() {
>
</Button>
<Popconfirm
title="确认删除该门店?"
description="将同时删除门店账号;若有关联订单或核销单将禁止删除。"
okText="删除"
okButtonProps={{ danger: true }}
onConfirm={() => void deleteStore(row.id)}
>
<Button type="link" size="small" danger>
</Button>
</Popconfirm>
</Space>
),
},
@@ -1034,6 +1064,17 @@ export default function StoresPage() {
void reload();
}} />
<Button type="primary" loading={saving} onClick={() => void saveStoreDetail()}></Button>
{detail?.id ? (
<Popconfirm
title="确认删除该门店?"
description="将同时删除门店账号;若有关联订单或核销单将禁止删除。"
okText="删除"
okButtonProps={{ danger: true }}
onConfirm={() => void deleteStore(String(detail.id))}
>
<Button danger loading={deleting}></Button>
</Popconfirm>
) : null}
</Space>
)}>
{detail && (