修复一些错误

This commit is contained in:
liu
2026-08-14 21:28:55 +08:00
parent 398bb98356
commit 228212f8e3
20 changed files with 489 additions and 100 deletions
+10
View File
@@ -110,6 +110,16 @@ const StorePage: React.FC = () => {
</Text>
),
},
{
title: '总采购金额',
dataIndex: 'total_purchase_amount',
hideInForm: true,
hideInSearch: true,
align: 'center',
render: (_, record) => (
<Text strong className={'text-[red]'}>¥{record.total_purchase_amount ?? '0.00'}</Text>
),
},
{
title: '状态',
dataIndex: 'status',
+3 -7
View File
@@ -41,20 +41,16 @@ const { Title, Text } = Typography;
/**
* 状态流转合法路径:待接单→已接单/已取消;采购中→配送中/已完成;配送中→已完成
* (已接单→采购中 通过「生成采购单」完成,不在流转按钮内
* 状态流转合法路径:手动流转仅保留「接单」「取消订单」
* (已接单→采购中 「生成采购单」推进;采购单完成→配送中、生成账单→已完成 由业务链路自动推进
*/
const NEXT_STATUS: Record<number, { status: number; label: string; }> = {
0: { status: 1, label: '接单' },
2: { status: 3, label: '开始配送' },
3: { status: 4, label: '完成订单' },
};
/** 批量流转可选目标状态(弹窗单选,后端全量校验,任一不允许则整批中止) */
const BATCH_TARGET_OPTIONS = [
{ value: 1, label: '接单(待接单 → 已接单)' },
{ value: 3, label: '开始配送(采购中 → 配送中)' },
{ value: 4, label: '完成订单(采购中/配送中 → 已完成)' },
{ value: 9, label: '取消订单(待接单 → 已取消)' },
];
@@ -411,7 +407,7 @@ const StoreOrderPage: React.FC = () => {
<div className="mb-5">
<Title level={3}></Title>
<Text type="secondary">
</Text>
</div>
<XinTable<IStoreOrder> {...tableProps} />
+7 -12
View File
@@ -3,7 +3,6 @@ import {
Button,
Descriptions,
Drawer,
Dropdown,
Empty,
Form,
Image,
@@ -833,18 +832,14 @@ const PurchaseOrderPage: React.FC = () => {
<>
<Space style={{ marginBottom: 20 }}>
<AuthButton key="export" auth="purchase.order.export">
<Dropdown
menu={{
items: [
{ key: 'all', label: '导出全品类', onClick: () => detail && exportPurchase(detail.purchase.id!, 'all') },
{ key: 'category', label: '仅导出蔬果分类', onClick: () => detail && exportPurchase(detail.purchase.id!, 'category') },
],
}}
<Button
type="primary"
ghost
icon={<DownloadOutlined />}
onClick={() => detail && exportPurchase(detail.purchase.id!)}
>
<Button type="primary" ghost icon={<DownloadOutlined />}>
</Button>
</Dropdown>
</Button>
</AuthButton>
</Space>
<Table<IPurchaseDetailRow>