From 00ee8d8656ae57fb46fb58bf0de49aa7b7ee74e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E7=8F=91?= Date: Mon, 11 Aug 2025 13:57:58 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=89=A9=E6=B5=81=E7=AE=A1=E7=90=86?= =?UTF-8?q?=EF=BC=9A=E5=A2=9E=E5=8A=A0=E8=AE=A2=E5=8D=95=E5=8F=B7=EF=BC=8C?= =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=90=9C=E7=B4=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Logistics/List/index.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/pages/Logistics/List/index.tsx b/src/pages/Logistics/List/index.tsx index a3ba5da..96779ef 100644 --- a/src/pages/Logistics/List/index.tsx +++ b/src/pages/Logistics/List/index.tsx @@ -38,17 +38,21 @@ const ListPage: React.FC = () => { })); }, }, + { + title: '订单号', + dataIndex: 'externalOrderId', + }, { title: '快递单号', - dataIndex: 'primary_tracking_number', + dataIndex: 'return_tracking_number', render(_, record) { return ( <> - {record.unique_id} + {record.return_tracking_number} { try { - await navigator.clipboard.writeText(record.unique_id); + await navigator.clipboard.writeText(record.return_tracking_number); message.success('复制成功!'); } catch (err) { message.error('复制失败!'); -- 2.40.1 From 081b87df7bfab1becf1c14ead40e46a66fae2924 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E7=8F=91?= Date: Mon, 11 Aug 2025 15:13:27 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=8F=96=E6=B6=88=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=93=8D=E5=BA=94=EF=BC=8C=E5=8F=96=E6=B6=88=E7=89=A9=E6=B5=81?= =?UTF-8?q?=E4=BA=8C=E6=AC=A1=E7=A1=AE=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/pages/Logistics/List/index.tsx | 41 +++++++++++++++++++++++++++--- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 970b7b7..b09cc56 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "file-saver": "^2.0.5", "print-js": "^1.6.0", "react-phone-input-2": "^2.15.1", + "react-toastify": "^11.0.5", "xlsx": "^0.18.5" }, "devDependencies": { diff --git a/src/pages/Logistics/List/index.tsx b/src/pages/Logistics/List/index.tsx index 96779ef..9fc33f9 100644 --- a/src/pages/Logistics/List/index.tsx +++ b/src/pages/Logistics/List/index.tsx @@ -5,19 +5,21 @@ import { stockcontrollerGetallstockpoints } from '@/servers/api/stock'; import { formatShipmentState } from '@/utils/format'; import { printPDF } from '@/utils/util'; import { CopyOutlined } from '@ant-design/icons'; +import { ToastContainer, toast } from 'react-toastify'; import { ActionType, PageContainer, ProColumns, ProTable, } from '@ant-design/pro-components'; -import { App, Button, Divider } from 'antd'; +import { App, Button, Divider, Popconfirm } from 'antd'; import { useRef, useState } from 'react'; const ListPage: React.FC = () => { const actionRef = useRef(); const { message } = App.useApp(); const [selectedRows, setSelectedRows] = useState([]); + const [isLoading, setIsLoading] = useState(false); const columns: ProColumns[] = [ { @@ -86,24 +88,55 @@ const ListPage: React.FC = () => { <> - - + */} + { + try { + setIsLoading(true); + const { success, message: errMsg } = + await logisticscontrollerDeleteShipment(record.id); + if (!success) { + throw new Error(errMsg); + } + setIsLoading(false); + actionRef.current?.reload(); + } catch (error: any) { + setIsLoading(false); + message.error(error.message); + } + }} + > + + + ); }, -- 2.40.1