diff --git a/packages/app-operation/src/components/Dealer/DeliveryTemplate.tsx b/packages/app-operation/src/components/Dealer/DeliveryTemplate.tsx index f990e51..1289a16 100644 --- a/packages/app-operation/src/components/Dealer/DeliveryTemplate.tsx +++ b/packages/app-operation/src/components/Dealer/DeliveryTemplate.tsx @@ -231,11 +231,6 @@ const getModuleFormSchema = (moduleType: string) => { title: '显示配置', valueType: 'group', columns: [ - { - dataIndex: 'showBoxType', - title: '显示箱号', - valueType: 'switch', - }, { dataIndex: 'showQuantity', title: '显示数量', @@ -565,25 +560,25 @@ const getModuleExampleData = (moduleType: string) => { boxType: '1号', quantity: '376', unitPrice: '8.70', - amount: '3,271', + amount: '3271', unitWeight: '2.70', - weight: '1,015', + weight: '1015', }, { boxCategory: '2粒', boxType: 'A', quantity: '700', unitPrice: '6.30', - amount: '4,410', + amount: '4410', unitWeight: '1.50', - weight: '1,050', + weight: '1050', }, { boxCategory: '2粒', boxType: 'AA', quantity: '456', unitPrice: '6.60', - amount: '3,010', + amount: '3010', unitWeight: '1.60', weight: '730', }, diff --git a/packages/app-operation/src/components/Dealer/Module/DealerInfoModule.tsx b/packages/app-operation/src/components/Dealer/Module/DealerInfoModule.tsx index 43bea05..20be02e 100644 --- a/packages/app-operation/src/components/Dealer/Module/DealerInfoModule.tsx +++ b/packages/app-operation/src/components/Dealer/Module/DealerInfoModule.tsx @@ -6,6 +6,7 @@ import { } from '@ant-design/icons'; import { Button, Typography } from 'antd'; import React from 'react'; +import classNames from 'classnames'; const { Text } = Typography; @@ -34,11 +35,12 @@ const DealerInfoModule: React.FC = ({ }) => { return (
{!previewMode && ( diff --git a/packages/app-operation/src/components/Dealer/Module/OtherFeesModule.tsx b/packages/app-operation/src/components/Dealer/Module/OtherFeesModule.tsx index 2ddfc0c..91eddfd 100644 --- a/packages/app-operation/src/components/Dealer/Module/OtherFeesModule.tsx +++ b/packages/app-operation/src/components/Dealer/Module/OtherFeesModule.tsx @@ -6,6 +6,7 @@ import { } from '@ant-design/icons'; import { Button, Typography } from 'antd'; import React from 'react'; +import classNames from 'classnames'; const { Text } = Typography; @@ -35,11 +36,12 @@ const OtherFeesModule: React.FC = ({ return (
{!previewMode && ( diff --git a/packages/app-operation/src/components/Dealer/Module/OtherInfoModule.tsx b/packages/app-operation/src/components/Dealer/Module/OtherInfoModule.tsx index 075fcb4..7db0b5d 100644 --- a/packages/app-operation/src/components/Dealer/Module/OtherInfoModule.tsx +++ b/packages/app-operation/src/components/Dealer/Module/OtherInfoModule.tsx @@ -6,6 +6,7 @@ import { ArrowDownOutlined, DeleteOutlined } from '@ant-design/icons'; +import classNames from 'classnames'; const { Text } = Typography; @@ -34,11 +35,12 @@ const OtherInfoModule: React.FC = ({ }) => { return (
{!previewMode && ( diff --git a/packages/app-operation/src/components/Dealer/Module/PackingSpecModule.tsx b/packages/app-operation/src/components/Dealer/Module/PackingSpecModule.tsx index 7a120a9..7239a34 100644 --- a/packages/app-operation/src/components/Dealer/Module/PackingSpecModule.tsx +++ b/packages/app-operation/src/components/Dealer/Module/PackingSpecModule.tsx @@ -1,3 +1,4 @@ +import { formatCurrency } from '@/utils/format'; import { ArrowDownOutlined, ArrowUpOutlined, @@ -47,11 +48,12 @@ const PackingSpecModule: React.FC = ({ return (
{!previewMode && ( @@ -177,11 +179,9 @@ const PackingSpecModule: React.FC = ({ {item.boxCategory}
- {config.showBoxType && ( -
- {item.boxType} -
- )} +
+ {item.boxType} +
{config.showQuantity && (
@@ -230,12 +230,40 @@ const PackingSpecModule: React.FC = ({
总件数
-
- {config.data?.reduce( - (acc: any, cur: any) => acc + Number(cur.quantity), - 0, - )} -
+ {config.showQuantity && ( +
+ {config.data?.reduce( + (acc: any, cur: any) => acc + Number(cur.quantity), + 0, + )} +
+ )} + {config.showUnitPrice && ( +
+ )} + {config.showAmount && ( +
+ {formatCurrency( + config.data?.reduce( + (acc: any, cur: any) => acc + Number(cur.amount), + 0, + ), + )} +
+ )} + {config.showUnitWeight && ( +
+ )} + {config.showWeight && ( +
+ {formatCurrency( + config.data?.reduce( + (acc: any, cur: any) => acc + Number(cur.weight), + 0, + ), + )} +
+ )}
diff --git a/packages/app-operation/src/components/Dealer/Module/PreviewCanvas.tsx b/packages/app-operation/src/components/Dealer/Module/PreviewCanvas.tsx index 0ea0569..6a75cce 100644 --- a/packages/app-operation/src/components/Dealer/Module/PreviewCanvas.tsx +++ b/packages/app-operation/src/components/Dealer/Module/PreviewCanvas.tsx @@ -1,9 +1,9 @@ import { + CompressOutlined, DeleteOutlined, + ExpandOutlined, EyeOutlined, PrinterOutlined, - ExpandOutlined, - CompressOutlined, ZoomInOutlined, ZoomOutOutlined, } from '@ant-design/icons'; @@ -124,9 +124,18 @@ const PreviewCanvas: React.FC = ({ return () => { document.removeEventListener('fullscreenchange', handleFullscreenChange); - document.removeEventListener('webkitfullscreenchange', handleFullscreenChange); - document.removeEventListener('mozfullscreenchange', handleFullscreenChange); - document.removeEventListener('MSFullscreenChange', handleFullscreenChange); + document.removeEventListener( + 'webkitfullscreenchange', + handleFullscreenChange, + ); + document.removeEventListener( + 'mozfullscreenchange', + handleFullscreenChange, + ); + document.removeEventListener( + 'MSFullscreenChange', + handleFullscreenChange, + ); }; }, []); @@ -150,17 +159,46 @@ const PreviewCanvas: React.FC = ({ 发货单打印预览 - @@ -206,8 +338,10 @@ const PreviewCanvas: React.FC = ({
-