diff --git a/src/pages/Order/List/index.tsx b/src/pages/Order/List/index.tsx index b04365b..443115a 100644 --- a/src/pages/Order/List/index.tsx +++ b/src/pages/Order/List/index.tsx @@ -2,6 +2,7 @@ import InternationalPhoneInput from '@/components/InternationalPhoneInput'; import { ORDER_STATUS_ENUM } from '@/constants'; import { logisticscontrollerCreateshipment, + logisticscontrollerGetShipmentFee, logisticscontrollerDelshipment, logisticscontrollerGetpaymentmethods, logisticscontrollerGetratelist, @@ -58,6 +59,7 @@ import { Button, Card, Col, + Descriptions, Divider, Drawer, Dropdown, @@ -69,6 +71,7 @@ import { Tabs, TabsProps, } from 'antd'; +import Item from 'antd/es/list/Item'; import dayjs from 'dayjs'; import React, { useMemo, useRef, useState } from 'react'; @@ -1025,6 +1028,7 @@ const Shipping: React.FC<{ const [options, setOptions] = useState([]); const formRef = useRef(); + const [shipmentFee, setShipmentFee] = useState(0); const [rates, setRates] = useState([]); const [ratesLoading, setRatesLoading] = useState(false); const { message } = App.useApp(); @@ -1118,11 +1122,11 @@ const Shipping: React.FC<{ { measurements: { weight: { - unit: 'lb', + unit: 'KGS', value: 1, }, cuboid: { - unit: 'in', + unit: 'CM', l: 6, w: 4, h: 4, @@ -1133,6 +1137,7 @@ const Shipping: React.FC<{ ], }, }, + }; }} onFinish={async ({ customer_note, notes, items, details, ...data }) => { @@ -1653,11 +1658,9 @@ const Shipping: React.FC<{ label="单位" name={['measurements', 'cuboid', 'unit']} valueEnum={{ - mm: '毫米', - cm: '厘米', - m: '米', - in: '英寸', - ft: '英尺', + CM: '厘米', + IN: '英寸', + FT: '英尺', }} placeholder="请输入单位" rules={[{ required: true, message: '请输入单位' }]} @@ -1673,7 +1676,7 @@ const Shipping: React.FC<{ @@ -1730,6 +1733,52 @@ const Shipping: React.FC<{ } }} + + ); }; diff --git a/src/servers/api/logistics.ts b/src/servers/api/logistics.ts index 292cb26..a84f55e 100644 --- a/src/servers/api/logistics.ts +++ b/src/servers/api/logistics.ts @@ -21,6 +21,22 @@ export async function logisticscontrollerCreateshipment( }); } +/** 此处后端没有提供注释 POST /logistics/getShipmentFee */ +export async function logisticscontrollerGetShipmentFee( + body: API.ShipmentBookDTO, + options?: { [key: string]: any }, +) { + return request(`/logistics/getShipmentFee`, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + + /** 此处后端没有提供注释 POST /logistics/getShipmentLabel/${param0} */ export async function logisticscontrollerGetShipmentLabel( shipmentId: number diff --git a/src/servers/api/typings.d.ts b/src/servers/api/typings.d.ts index 7cc9827..6a53eaf 100644 --- a/src/servers/api/typings.d.ts +++ b/src/servers/api/typings.d.ts @@ -1021,6 +1021,7 @@ declare namespace API { packaging_type?: 'pallet' | 'package' | 'courier-pak' | 'envelope'; packaging_properties?: PackagingPackage[]; reference_codes?: any; + shipmentFee: number; }; type SiteConfig = { diff --git a/src/utils/PDFDownloader 2.tsx b/src/utils/PDFDownloader 2.tsx new file mode 100644 index 0000000..e69de29