Compare commits
6 Commits
4da8fbfdc8
...
4d3abcd13f
| Author | SHA1 | Date |
|---|---|---|
|
|
4d3abcd13f | |
|
|
cb596ada87 | |
|
|
95617d1c28 | |
|
|
45fb186ed3 | |
|
|
94962c4835 | |
|
|
644fb1775f |
|
|
@ -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>
|
||||
</>
|
||||
);
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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} />,
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in New Issue