forked from yoone/WEB
1
0
Fork 0

Compare commits

..

6 Commits

Author SHA1 Message Date
黄珑 4d3abcd13f Fix: 增加删除运单按钮 2025-08-09 19:08:22 +08:00
cll cb596ada87 Merge branch 'dev/cll-fix' 2025-08-08 20:47:21 +08:00
cll 95617d1c28 fix: bug 2025-08-08 20:46:58 +08:00
cll 45fb186ed3 Merge branch 'dev/cll-fix' 2025-08-08 20:24:45 +08:00
cll 94962c4835 fix: 订单列表-历史订单 2025-08-08 20:24:08 +08:00
longbot 644fb1775f Merge pull request 'Fix: bug fix' (#3) from longbot/WEB:Feature-add-shipment into main
Reviewed-on: yoone/WEB#3
2025-08-08 11:33:54 +00:00
3 changed files with 231 additions and 194 deletions

View File

@ -1,4 +1,6 @@
import { logisticscontrollerGetlist, logisticscontrollerGetShipmentLabel } from '@/servers/api/logistics';
import { logisticscontrollerGetlist, logisticscontrollerGetShipmentLabel,
logisticscontrollerDeleteShipment
} from '@/servers/api/logistics';
import { stockcontrollerGetallstockpoints } from '@/servers/api/stock';
import { formatShipmentState } from '@/utils/format';
import { printPDF } from '@/utils/util';
@ -9,7 +11,7 @@ import {
ProColumns,
ProTable,
} from '@ant-design/pro-components';
import { App, Button } from 'antd';
import { App, Button, Divider } from 'antd';
import { useRef, useState } from 'react';
const ListPage: React.FC = () => {
@ -77,6 +79,7 @@ const ListPage: React.FC = () => {
hideInSearch: true,
render(_, record) {
return (
<>
<Button
type="primary"
onClick={async () => {
@ -87,6 +90,17 @@ const ListPage: React.FC = () => {
>
Label
</Button>
<Divider type="vertical" />
<Button
type="primary"
onClick={async () => {
const { data } = await logisticscontrollerDeleteShipment(record.id);
console.log('data', data);// todo 刷新页面
}}
>
Cancel
</Button>
</>
);
},
},

View File

@ -1,4 +1,5 @@
import InternationalPhoneInput from '@/components/InternationalPhoneInput';
import { HistoryOrder } from '@/pages/Statistics/Order';
import { ORDER_STATUS_ENUM } from '@/constants';
import {
logisticscontrollerCreateshipment,
@ -310,6 +311,14 @@ const ListPage: React.FC = () => {
: 'block',
},
},
{
key: 'history',
label:
<HistoryOrder
email={record.customer_email}
tableRef={actionRef}
/>,
},
{
key: 'note',
label: <OrderNote id={record.id as number} />,

View File

@ -48,6 +48,20 @@ export async function logisticscontrollerGetShipmentLabel(
}
});
}
/** 此处后端没有提供注释 DEL /logistics/deleteShipment/${param0} */
export async function logisticscontrollerDeleteShipment(
shipmentId: number
) {
return request<API.BooleanRes>(`/logistics/deleteShipment/${shipmentId}`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
}
});
}
/** 此处后端没有提供注释 POST /logistics/createShippingAddress */
export async function logisticscontrollerCreateshippingaddress(