Compare commits
10 Commits
fb79163721
...
f030e6c334
| Author | SHA1 | Date |
|---|---|---|
|
|
f030e6c334 | |
|
|
46202d602e | |
|
|
ac948ac0f4 | |
|
|
c41f0e668e | |
|
|
b432b3af17 | |
|
|
c77020f3d6 | |
|
|
e19b6c3656 | |
|
|
68a7b02d21 | |
|
|
d54782f742 | |
|
|
c815ab3396 |
|
|
@ -13,3 +13,4 @@
|
|||
.swc
|
||||
/package-lock.json
|
||||
/yarn.lock
|
||||
*.yaml
|
||||
|
|
|
|||
14
.umirc.ts
14
.umirc.ts
|
|
@ -6,6 +6,7 @@ const UMI_APP_API_URL = isDev
|
|||
: 'https://api.yoone.ca';
|
||||
|
||||
export default defineConfig({
|
||||
hash: true,
|
||||
antd: {},
|
||||
access: {},
|
||||
model: {},
|
||||
|
|
@ -25,7 +26,7 @@ export default defineConfig({
|
|||
{
|
||||
name: '组织架构',
|
||||
path: '/organiza',
|
||||
access: 'canSeeSuper',
|
||||
access: 'canSeeOrganiza',
|
||||
routes: [
|
||||
{
|
||||
name: '用户管理',
|
||||
|
|
@ -37,6 +38,7 @@ export default defineConfig({
|
|||
{
|
||||
name: '商品管理',
|
||||
path: '/product',
|
||||
access: 'canSeeProduct',
|
||||
routes: [
|
||||
{
|
||||
name: '商品分类',
|
||||
|
|
@ -68,6 +70,7 @@ export default defineConfig({
|
|||
{
|
||||
name: '库存管理',
|
||||
path: '/stock',
|
||||
access: 'canSeeStock',
|
||||
routes: [
|
||||
{
|
||||
name: '库存列表',
|
||||
|
|
@ -99,7 +102,7 @@ export default defineConfig({
|
|||
{
|
||||
name: '订单管理',
|
||||
path: '/order',
|
||||
access: 'canSeeAdmin',
|
||||
access: 'canSeeOrder',
|
||||
routes: [
|
||||
{
|
||||
name: '订单列表',
|
||||
|
|
@ -116,6 +119,7 @@ export default defineConfig({
|
|||
{
|
||||
name: '客户管理',
|
||||
path: '/customer',
|
||||
access: 'canSeeCustomer',
|
||||
routes: [
|
||||
{
|
||||
name: '客户列表',
|
||||
|
|
@ -127,6 +131,7 @@ export default defineConfig({
|
|||
{
|
||||
name: '物流管理',
|
||||
path: '/logistics',
|
||||
access: 'canSeeLogistics',
|
||||
routes: [
|
||||
{
|
||||
name: '服务商',
|
||||
|
|
@ -148,30 +153,27 @@ export default defineConfig({
|
|||
{
|
||||
name: '数据统计',
|
||||
path: '/statistics',
|
||||
access: 'canSeeStatistics',
|
||||
routes: [
|
||||
{
|
||||
name: '销售统计',
|
||||
path: '/statistics/sales',
|
||||
component: './Statistics/Sales',
|
||||
access: 'canSeeSuper',
|
||||
},
|
||||
{
|
||||
name: '订单统计',
|
||||
path: '/statistics/order',
|
||||
component: './Statistics/Order',
|
||||
access: 'canSeeSuper',
|
||||
},
|
||||
{
|
||||
name: '订单来源',
|
||||
path: '/statistics/orderSource',
|
||||
component: './Statistics/OrderSource',
|
||||
access: 'canSeeSuper',
|
||||
},
|
||||
{
|
||||
name: '客户统计',
|
||||
path: '/statistics/customer',
|
||||
component: './Statistics/Customer',
|
||||
access: 'canSeeSuper',
|
||||
},
|
||||
{
|
||||
name: '库存预测',
|
||||
|
|
|
|||
|
|
@ -1,9 +1,22 @@
|
|||
export default (initialState: any) => {
|
||||
const canSeeSuper = initialState?.user?.isSuper;
|
||||
const canSeeAdmin =
|
||||
initialState?.user?.isSuper || initialState?.user?.isAdmin;
|
||||
const isSuper = initialState?.user?.isSuper ?? false;
|
||||
const isAdmin = initialState?.user?.Admin ?? false;
|
||||
const canSeeOrganiza = (isSuper || isAdmin) || (initialState?.user?.permissions?.includes('organiza') ?? false);
|
||||
const canSeeProduct = (isSuper || isAdmin) || (initialState?.user?.permissions?.includes('product') ?? false);
|
||||
const canSeeStock = (isSuper || isAdmin) || (initialState?.user?.permissions?.includes('stock') ?? false);
|
||||
const canSeeOrder = (isSuper || isAdmin) ||
|
||||
((initialState?.user?.permissions?.includes('order') ?? false) || (initialState?.user?.permissions?.includes('order-10-days') ?? false));
|
||||
const canSeeCustomer = (isSuper || isAdmin) || (initialState?.user?.permissions?.includes('customer') ?? false);
|
||||
const canSeeLogistics = (isSuper || isAdmin) || (initialState?.user?.permissions?.includes('logistics') ?? false);
|
||||
const canSeeStatistics = (isSuper || isAdmin) || (initialState?.user?.permissions?.includes('statistics') ?? false);
|
||||
|
||||
return {
|
||||
canSeeSuper,
|
||||
canSeeAdmin,
|
||||
canSeeOrganiza,
|
||||
canSeeProduct,
|
||||
canSeeStock,
|
||||
canSeeOrder,
|
||||
canSeeCustomer,
|
||||
canSeeLogistics,
|
||||
canSeeStatistics,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ const Page = () => {
|
|||
try {
|
||||
const { data, success, code, message: msg } = await usercontrollerLogin({...values, deviceId});
|
||||
if (success) {
|
||||
|
||||
message.success('登录成功');
|
||||
localStorage.setItem('token', data?.token as string);
|
||||
const { data: user } = await usercontrollerGetuser();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { logisticscontrollerGetlist, logisticscontrollerGetShipmentLabel,
|
||||
logisticscontrollerDeleteShipment,
|
||||
logisticscontrollerGetShipmentState
|
||||
import { logisticscontrollerGetlist, logisticscontrollerGetshipmentlabel,
|
||||
logisticscontrollerDeleteshipment,
|
||||
logisticscontrollerUpdateshipmentstate
|
||||
} from '@/servers/api/logistics';
|
||||
import { stockcontrollerGetallstockpoints } from '@/servers/api/stock';
|
||||
import { formatUniuniShipmentState } from '@/utils/format';
|
||||
|
|
@ -106,7 +106,7 @@ const ListPage: React.FC = () => {
|
|||
disabled={isLoading}
|
||||
onClick={async () => {
|
||||
setIsLoading(true);
|
||||
const { data } = await logisticscontrollerGetShipmentLabel(record.id);
|
||||
const { data } = await logisticscontrollerGetshipmentlabel(record.id);
|
||||
const content = data.content;
|
||||
printPDF([content]);
|
||||
setIsLoading(false);
|
||||
|
|
@ -120,7 +120,7 @@ const ListPage: React.FC = () => {
|
|||
disabled={isLoading}
|
||||
onClick={async () => {
|
||||
setIsLoading(true);
|
||||
const res = await logisticscontrollerGetShipmentState(record.id);
|
||||
const res = await logisticscontrollerUpdateshipmentstate({shipmentId:record.id});
|
||||
console.log('res', res);
|
||||
|
||||
setIsLoading(false);
|
||||
|
|
@ -137,7 +137,7 @@ const ListPage: React.FC = () => {
|
|||
try {
|
||||
setIsLoading(true);
|
||||
const { success, message: errMsg } =
|
||||
await logisticscontrollerDeleteShipment(record.id);
|
||||
await logisticscontrollerDeleteshipment(record.id);
|
||||
if (!success) {
|
||||
throw new Error(errMsg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,16 @@
|
|||
import styles from '../../../style/order-list.css';
|
||||
|
||||
import InternationalPhoneInput from '@/components/InternationalPhoneInput';
|
||||
import { HistoryOrder } from '@/pages/Statistics/Order';
|
||||
import { ORDER_STATUS_ENUM } from '@/constants';
|
||||
import {
|
||||
logisticscontrollerCreateshipment,
|
||||
logisticscontrollerGetShipmentFee,
|
||||
logisticscontrollerGetshipmentfee,
|
||||
logisticscontrollerDelshipment,
|
||||
logisticscontrollerGetpaymentmethods,
|
||||
logisticscontrollerGetratelist,
|
||||
logisticscontrollerGetshippingaddresslist,
|
||||
logisticscontrollerGetShipmentLabel,
|
||||
// logisticscontrollerGetshipmentlabel,
|
||||
} from '@/servers/api/logistics';
|
||||
import {
|
||||
ordercontrollerCancelorder,
|
||||
|
|
@ -22,7 +24,7 @@ import {
|
|||
ordercontrollerRefundorder,
|
||||
ordercontrollerSyncorder,
|
||||
ordercontrollerSyncorderbyid,
|
||||
ordercontrollerUpdateOrderItems,
|
||||
ordercontrollerUpdateorderitems,
|
||||
} from '@/servers/api/order';
|
||||
import { productcontrollerSearchproducts } from '@/servers/api/product';
|
||||
import { sitecontrollerAll } from '@/servers/api/site';
|
||||
|
|
@ -84,6 +86,7 @@ const ListPage: React.FC = () => {
|
|||
const actionRef = useRef<ActionType>();
|
||||
const [activeKey, setActiveKey] = useState<string>('all');
|
||||
const [count, setCount] = useState<any[]>([]);
|
||||
const [activeLine, setActiveLine] = useState<number>(-1);
|
||||
const tabs: TabsProps['items'] = useMemo(() => {
|
||||
const total = count.reduce((acc, cur) => acc + Number(cur.count), 0);
|
||||
const tabs = [
|
||||
|
|
@ -265,7 +268,7 @@ const ListPage: React.FC = () => {
|
|||
record.orderStatus,
|
||||
) ? (
|
||||
<>
|
||||
<Shipping id={record.id as number} tableRef={actionRef} />
|
||||
<Shipping id={record.id as number} tableRef={actionRef} setActiveLine={setActiveLine}/>
|
||||
<Divider type="vertical" />
|
||||
</>
|
||||
) : (
|
||||
|
|
@ -276,6 +279,7 @@ const ListPage: React.FC = () => {
|
|||
record={record}
|
||||
tableRef={actionRef}
|
||||
orderId={record.id as number}
|
||||
setActiveLine={setActiveLine}
|
||||
/>
|
||||
<Divider type="vertical" />
|
||||
<Dropdown
|
||||
|
|
@ -393,6 +397,9 @@ const ListPage: React.FC = () => {
|
|||
scroll={{ x: 'max-content' }}
|
||||
actionRef={actionRef}
|
||||
rowKey="id"
|
||||
rowClassName={(record) => {
|
||||
return record.id === activeLine ? styles['selected-line-order-protable']: '';
|
||||
}}
|
||||
toolBarRender={() => [
|
||||
<CreateOrder tableRef={actionRef} />,
|
||||
<SyncForm tableRef={actionRef} />,
|
||||
|
|
@ -480,7 +487,8 @@ const Detail: React.FC<{
|
|||
tableRef: React.MutableRefObject<ActionType | undefined>;
|
||||
orderId: number;
|
||||
record: API.Order;
|
||||
}> = ({ tableRef, orderId, record }) => {
|
||||
setActiveLine: Function
|
||||
}> = ({ tableRef, orderId, record, setActiveLine }) => {
|
||||
const [visiable, setVisiable] = useState(false);
|
||||
const { message } = App.useApp();
|
||||
const ref = useRef<ActionType>();
|
||||
|
|
@ -491,6 +499,7 @@ const Detail: React.FC<{
|
|||
orderId,
|
||||
});
|
||||
if (!success || !data) return { data: {} };
|
||||
// 合并订单中相同的sku,只显示一次记录总数
|
||||
data.sales = data.sales?.reduce(
|
||||
(acc: API.OrderSale[], cur: API.OrderSale) => {
|
||||
let idx = acc.findIndex((v: any) => v.productId === cur.productId);
|
||||
|
|
@ -510,7 +519,10 @@ const Detail: React.FC<{
|
|||
|
||||
return (
|
||||
<>
|
||||
<Button key="detail" type="primary" onClick={() => setVisiable(true)}>
|
||||
<Button key="detail" type="primary" onClick={() => {
|
||||
setVisiable(true);
|
||||
setActiveLine(record.id);
|
||||
}}>
|
||||
<FileDoneOutlined />
|
||||
详情
|
||||
</Button>
|
||||
|
|
@ -1049,7 +1061,8 @@ const Shipping: React.FC<{
|
|||
tableRef?: React.MutableRefObject<ActionType | undefined>;
|
||||
descRef?: React.MutableRefObject<ActionType | undefined>;
|
||||
reShipping?: boolean;
|
||||
}> = ({ id, tableRef, descRef, reShipping = false }) => {
|
||||
setActiveLine: Function;
|
||||
}> = ({ id, tableRef, descRef, reShipping = false, setActiveLine }) => {
|
||||
const [options, setOptions] = useState<any[]>([]);
|
||||
const formRef = useRef<ProFormInstance>();
|
||||
|
||||
|
|
@ -1071,7 +1084,11 @@ const Shipping: React.FC<{
|
|||
},
|
||||
}}
|
||||
trigger={
|
||||
<Button type="primary">
|
||||
<Button type="primary"
|
||||
onClick={() => {
|
||||
setActiveLine(id);
|
||||
}}
|
||||
>
|
||||
<CodeSandboxOutlined />
|
||||
创建运单
|
||||
</Button>
|
||||
|
|
@ -1785,13 +1802,32 @@ const Shipping: React.FC<{
|
|||
details.destination.phone_number.phone;
|
||||
details.origin.phone_number.number = details.origin.phone_number.phone;
|
||||
const res =
|
||||
await logisticscontrollerGetShipmentFee(
|
||||
await logisticscontrollerGetshipmentfee(
|
||||
{
|
||||
details,
|
||||
...data
|
||||
stockPointId: data.stockPointId,
|
||||
|
||||
sender: details.origin.contact_name,
|
||||
startPhone: details.origin.phone_number,
|
||||
startPostalCode: details.origin.address.postal_code.replace(/\s/g, ''),
|
||||
pickupAddress: details.origin.address.address_line_1,
|
||||
shipperCountryCode: details.origin.address.country,
|
||||
receiver: details.destination.contact_name,
|
||||
city: details.destination.address.city,
|
||||
province: details.destination.address.region,
|
||||
country: details.destination.address.country,
|
||||
postalCode: details.destination.address.postal_code.replace(/\s/g, ''),
|
||||
deliveryAddress: details.destination.address.address_line_1,
|
||||
receiverPhone: details.destination.phone_number.number,
|
||||
receiverEmail: details.destination.email_addresses,
|
||||
length: details.packaging_properties.packages[0].measurements.cuboid.l,
|
||||
width: details.packaging_properties.packages[0].measurements.cuboid.w,
|
||||
height: details.packaging_properties.packages[0].measurements.cuboid.h,
|
||||
dimensionUom: details.packaging_properties.packages[0].measurements.cuboid.unit,
|
||||
weight: details.packaging_properties.packages[0].measurements.weight.value,
|
||||
weightUom: details.packaging_properties.packages[0].measurements.weight.unit,
|
||||
},
|
||||
);
|
||||
if (!res?.success) throw new Error(res?.errMsg);
|
||||
if (!res?.success) throw new Error(res?.message);
|
||||
const fee = res.data;
|
||||
setShipmentFee(fee);
|
||||
details.origin.email_addresses = originEmail;
|
||||
|
|
@ -1800,6 +1836,7 @@ const Shipping: React.FC<{
|
|||
...details,
|
||||
shipmentFee: fee
|
||||
});
|
||||
message.success('获取运费成功');
|
||||
} catch (error) {
|
||||
message.error(error?.message || '获取运费失败');
|
||||
}
|
||||
|
|
@ -1823,7 +1860,6 @@ const SalesChange: React.FC<{
|
|||
detailRef?: React.MutableRefObject<ActionType | undefined>;
|
||||
reShipping?: boolean;
|
||||
}> = ({ id, detailRef }) => {
|
||||
const [options, setOptions] = useState<any[]>([]);
|
||||
const formRef = useRef<ProFormInstance>();
|
||||
|
||||
|
||||
|
|
@ -1872,7 +1908,7 @@ const SalesChange: React.FC<{
|
|||
}}
|
||||
onFinish={async (formData: any) => {
|
||||
const { sales } = formData;
|
||||
const res = await ordercontrollerUpdateOrderItems(id, sales);
|
||||
const res = await ordercontrollerUpdateorderitems({orderId:id}, sales);
|
||||
if (!res.success) {
|
||||
message.error(`更新货物信息失败: ${res.message}`);
|
||||
return false;
|
||||
|
|
@ -1888,9 +1924,8 @@ const SalesChange: React.FC<{
|
|||
>
|
||||
<ProForm.Group>
|
||||
<ProFormSelect
|
||||
params={{ options }}
|
||||
request={async ({ keyWords, options }) => {
|
||||
if (!keyWords || keyWords.length < 2) return options;
|
||||
params={{ }}
|
||||
request={async ({ keyWords }) => {
|
||||
try {
|
||||
const { data } = await productcontrollerSearchproducts({
|
||||
name: keyWords,
|
||||
|
|
@ -1901,10 +1936,10 @@ const SalesChange: React.FC<{
|
|||
label: `${item.name} - ${item.nameCn}`,
|
||||
value: item?.sku,
|
||||
};
|
||||
}) || options
|
||||
})
|
||||
);
|
||||
} catch (error) {
|
||||
return options;
|
||||
return [];
|
||||
}
|
||||
}}
|
||||
name="sku"
|
||||
|
|
|
|||
|
|
@ -35,6 +35,12 @@ const ListPage: React.FC = () => {
|
|||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '排除套装',
|
||||
dataIndex: 'exceptPackage',
|
||||
valueType: 'switch',
|
||||
hideInTable: true,
|
||||
},
|
||||
{
|
||||
title: '产品名称',
|
||||
dataIndex: 'name',
|
||||
|
|
@ -52,12 +58,12 @@ const ListPage: React.FC = () => {
|
|||
},
|
||||
hideInTable: true,
|
||||
},
|
||||
{
|
||||
title: '分类',
|
||||
dataIndex: 'categoryName',
|
||||
hideInSearch: true,
|
||||
hideInTable: isSource,
|
||||
},
|
||||
// {
|
||||
// title: '分类',
|
||||
// dataIndex: 'categoryName',
|
||||
// hideInSearch: true,
|
||||
// hideInTable: isSource,
|
||||
// },
|
||||
{
|
||||
title: '数量',
|
||||
dataIndex: 'totalQuantity',
|
||||
|
|
|
|||
|
|
@ -525,6 +525,7 @@ const DetailForm: React.FC<{
|
|||
id: number;
|
||||
};
|
||||
}> = ({ tableRef, values }) => {
|
||||
const detailsActionRef = useRef<ActionType>();
|
||||
const { message } = App.useApp();
|
||||
const [form] = Form.useForm();
|
||||
const initialValues = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import {
|
||||
logisticscontrollerGetlistbytrackingid,
|
||||
logisticscontrollerGettrackingnumber,
|
||||
logisticscontrollerGetorderlist,
|
||||
logisticscontrollerGetlistbyorderid
|
||||
} from '@/servers/api/logistics';
|
||||
import { SearchOutlined } from '@ant-design/icons';
|
||||
import { PageContainer, ProFormSelect } from '@ant-design/pro-components';
|
||||
|
|
@ -8,7 +8,7 @@ import { useState } from 'react';
|
|||
|
||||
const TrackPage: React.FC = () => {
|
||||
const [id, setId] = useState<string>();
|
||||
const [data, setData] = useState([]);
|
||||
const [data, setData] = useState({});
|
||||
return (
|
||||
<PageContainer>
|
||||
<ProFormSelect
|
||||
|
|
@ -17,7 +17,7 @@ const TrackPage: React.FC = () => {
|
|||
request={async ({ keyWords }) => {
|
||||
if (!keyWords || keyWords.length < 3) return [];
|
||||
const { data: trackList } =
|
||||
await logisticscontrollerGettrackingnumber({ number: keyWords });
|
||||
await logisticscontrollerGetorderlist({ number: keyWords });
|
||||
return trackList?.map((v) => {
|
||||
return {
|
||||
label: v.siteName + ' ' + v.externalOrderId,
|
||||
|
|
@ -29,7 +29,9 @@ const TrackPage: React.FC = () => {
|
|||
prefix: '订单号',
|
||||
onChange(value: string) {
|
||||
setId(value);
|
||||
setData({})
|
||||
},
|
||||
placeholder: '请输入订单号',
|
||||
allowClear: false,
|
||||
suffixIcon: (
|
||||
<SearchOutlined
|
||||
|
|
@ -37,8 +39,8 @@ const TrackPage: React.FC = () => {
|
|||
if (!id) {
|
||||
return;
|
||||
}
|
||||
const { data } = await logisticscontrollerGetlistbytrackingid({
|
||||
shipment_id: id,
|
||||
const { data } = await logisticscontrollerGetlistbyorderid({
|
||||
id,
|
||||
});
|
||||
setData(data);
|
||||
}}
|
||||
|
|
@ -46,22 +48,32 @@ const TrackPage: React.FC = () => {
|
|||
),
|
||||
}}
|
||||
/>
|
||||
<div>
|
||||
{data.map((item) => (
|
||||
{
|
||||
data?.item ?
|
||||
<div>
|
||||
<h4>
|
||||
{item.name} * {item.quantity}
|
||||
</h4>
|
||||
<div style={{ paddingLeft: 20, color: 'blue' }}>
|
||||
{item.constitution.map((v) => (
|
||||
<div>
|
||||
{v.name} * {v.quantity * item.quantity}
|
||||
<div>
|
||||
<h4>原订单内容</h4>
|
||||
{data?.item?.map((item) => (
|
||||
<div style={{ paddingLeft: 20, color: 'blue' }}>
|
||||
{item.name} * {item.quantity}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div> : <></>
|
||||
}
|
||||
{
|
||||
data?.saleItem ?
|
||||
<div>
|
||||
<div>
|
||||
<h4>订单内容</h4>
|
||||
{data?.saleItem?.map((item) => (
|
||||
<div style={{ paddingLeft: 20, color: 'blue' }}>
|
||||
{item.name} * {item.quantity}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div> : <></>
|
||||
}
|
||||
</PageContainer>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -21,61 +21,6 @@ export async function logisticscontrollerCreateshipment(
|
|||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 POST /logistics/getShipmentFee */
|
||||
export async function logisticscontrollerGetShipmentFee(
|
||||
body: API.ShipmentBookDTO,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.BooleanRes>(`/logistics/getShipmentFee`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/** 此处后端没有提供注释 POST /logistics/getShipmentLabel/${param0} */
|
||||
export async function logisticscontrollerGetShipmentLabel(
|
||||
shipmentId: number
|
||||
) {
|
||||
return request<API.BooleanRes>(`/logistics/getShipmentLabel/${shipmentId}`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 POST /logistics/updateState/${param0}**/
|
||||
export async function logisticscontrollerGetShipmentState(
|
||||
shipmentId: number
|
||||
) {
|
||||
return request<API.BooleanRes>(`/logistics/updateState/${shipmentId}`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 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(
|
||||
body: API.ShippingAddress,
|
||||
|
|
@ -91,6 +36,20 @@ export async function logisticscontrollerCreateshippingaddress(
|
|||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 POST /logistics/deleteShipment/${param0} */
|
||||
export async function logisticscontrollerDeleteshipment(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.logisticscontrollerDeleteshipmentParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
const { id: param0, ...queryParams } = params;
|
||||
return request<API.BooleanRes>(`/logistics/deleteShipment/${param0}`, {
|
||||
method: 'POST',
|
||||
params: { ...queryParams },
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 DELETE /logistics/delShippingAddress/${param0} */
|
||||
export async function logisticscontrollerDelshippingaddress(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
|
|
@ -105,13 +64,28 @@ export async function logisticscontrollerDelshippingaddress(
|
|||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 POST /logistics/getListByTrackingId */
|
||||
export async function logisticscontrollerGetlistbytrackingid(
|
||||
/** 此处后端没有提供注释 POST /logistics/getListByOrderId */
|
||||
export async function logisticscontrollerGetlistbyorderid(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.logisticscontrollerGetlistbytrackingidParams,
|
||||
params: API.logisticscontrollerGetlistbyorderidParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<any>('/logistics/getListByTrackingId', {
|
||||
return request<any>('/logistics/getListByOrderId', {
|
||||
method: 'POST',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 POST /logistics/getOrderList */
|
||||
export async function logisticscontrollerGetorderlist(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.logisticscontrollerGetorderlistParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<any>('/logistics/getOrderList', {
|
||||
method: 'POST',
|
||||
params: {
|
||||
...params,
|
||||
|
|
@ -160,6 +134,35 @@ export async function logisticscontrollerGetservicelist(
|
|||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 POST /logistics/getShipmentFee */
|
||||
export async function logisticscontrollerGetshipmentfee(
|
||||
body: API.ShipmentFeeBookDTO,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.BooleanRes>('/logistics/getShipmentFee', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 POST /logistics/getShipmentLabel/${param0} */
|
||||
export async function logisticscontrollerGetshipmentlabel(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.logisticscontrollerGetshipmentlabelParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
const { shipmentId: param0, ...queryParams } = params;
|
||||
return request<API.BooleanRes>(`/logistics/getShipmentLabel/${param0}`, {
|
||||
method: 'POST',
|
||||
params: { ...queryParams },
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 GET /logistics/getShippingAddressList */
|
||||
export async function logisticscontrollerGetshippingaddresslist(options?: {
|
||||
[key: string]: any;
|
||||
|
|
@ -173,21 +176,6 @@ export async function logisticscontrollerGetshippingaddresslist(options?: {
|
|||
);
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 POST /logistics/getTrackingNumber */
|
||||
export async function logisticscontrollerGettrackingnumber(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.logisticscontrollerGettrackingnumberParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<any>('/logistics/getTrackingNumber', {
|
||||
method: 'POST',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 GET /logistics/list */
|
||||
export async function logisticscontrollerGetlist(options?: {
|
||||
[key: string]: any;
|
||||
|
|
@ -255,3 +243,17 @@ export async function logisticscontrollerUpdateshippingaddress(
|
|||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 POST /logistics/updateState/${param0} */
|
||||
export async function logisticscontrollerUpdateshipmentstate(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.logisticscontrollerUpdateshipmentstateParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
const { shipmentId: param0, ...queryParams } = params;
|
||||
return request<any>(`/logistics/updateState/${param0}`, {
|
||||
method: 'POST',
|
||||
params: { ...queryParams },
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -210,16 +210,19 @@ export async function ordercontrollerSyncorderbyid(
|
|||
}
|
||||
|
||||
/** 此处后端没有提供注释 POST /order/updateOrderItems/${param0} */
|
||||
export async function ordercontrollerUpdateOrderItems(
|
||||
orderId: number,
|
||||
body: API.ShipmentSkuDTO,
|
||||
export async function ordercontrollerUpdateorderitems(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.ordercontrollerUpdateorderitemsParams,
|
||||
body: Record<string, any>,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.BooleanRes>(`/order/updateOrderItems/${orderId}`, {
|
||||
const { orderId: param0, ...queryParams } = params;
|
||||
return request<API.BooleanRes>(`/order/updateOrderItems/${param0}`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Content-Type': 'text/plain',
|
||||
},
|
||||
params: { ...queryParams },
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -168,15 +168,19 @@ declare namespace API {
|
|||
};
|
||||
|
||||
type logisticscontrollerDelshipmentParams = {
|
||||
id: string;
|
||||
id: number;
|
||||
};
|
||||
|
||||
type logisticscontrollerDelshippingaddressParams = {
|
||||
id: number;
|
||||
};
|
||||
|
||||
type logisticscontrollerGetlistbytrackingidParams = {
|
||||
shipment_id?: string;
|
||||
type logisticscontrollerGetlistbyorderidParams = {
|
||||
id?: number;
|
||||
};
|
||||
|
||||
type logisticscontrollerGetorderlistParams = {
|
||||
number?: string;
|
||||
};
|
||||
|
||||
type logisticscontrollerGetservicelistParams = {
|
||||
|
|
@ -189,11 +193,11 @@ declare namespace API {
|
|||
};
|
||||
|
||||
type logisticscontrollerGetshipmentlabelParams = {
|
||||
shipmentId: string;
|
||||
shipmentId: number;
|
||||
};
|
||||
|
||||
type logisticscontrollerGettrackingnumberParams = {
|
||||
number?: string;
|
||||
type logisticscontrollerUpdateshipmentstateParams = {
|
||||
shipmentId: number;
|
||||
};
|
||||
|
||||
type logisticscontrollerUpdateshippingaddressParams = {
|
||||
|
|
@ -216,7 +220,7 @@ declare namespace API {
|
|||
externalOrderId?: string;
|
||||
status?: any;
|
||||
orderStatus?: any;
|
||||
shipmentId?: string;
|
||||
shipmentId?: number;
|
||||
currency?: string;
|
||||
currency_symbol?: string;
|
||||
prices_include_tax?: boolean;
|
||||
|
|
@ -341,13 +345,17 @@ declare namespace API {
|
|||
siteId: string;
|
||||
};
|
||||
|
||||
type ordercontrollerUpdateorderitemsParams = {
|
||||
orderId: number;
|
||||
};
|
||||
|
||||
type OrderDetail = {
|
||||
id?: number;
|
||||
siteId?: string;
|
||||
externalOrderId?: string;
|
||||
status?: any;
|
||||
orderStatus?: any;
|
||||
shipmentId?: string;
|
||||
shipmentId?: number;
|
||||
currency?: string;
|
||||
currency_symbol?: string;
|
||||
prices_include_tax?: boolean;
|
||||
|
|
@ -493,7 +501,11 @@ declare namespace API {
|
|||
/** sku */
|
||||
sku?: string;
|
||||
quantity?: number;
|
||||
isPackage?: boolean;
|
||||
exceptPackage?: boolean;
|
||||
isYoone?: boolean;
|
||||
isZex?: boolean;
|
||||
size?: number;
|
||||
isYooneNew?: boolean;
|
||||
/** 创建时间 */
|
||||
createdAt?: string;
|
||||
/** 更新时间 */
|
||||
|
|
@ -510,7 +522,11 @@ declare namespace API {
|
|||
/** sku */
|
||||
sku?: string;
|
||||
quantity?: number;
|
||||
isPackage?: boolean;
|
||||
exceptPackage?: boolean;
|
||||
isYoone?: boolean;
|
||||
isZex?: boolean;
|
||||
size?: number;
|
||||
isYooneNew?: boolean;
|
||||
/** 创建时间 */
|
||||
createdAt?: string;
|
||||
/** 更新时间 */
|
||||
|
|
@ -993,9 +1009,28 @@ declare namespace API {
|
|||
orderIds?: number[];
|
||||
};
|
||||
|
||||
type ShipmentSkuDTO = {
|
||||
sales?: OrderSale[];
|
||||
}
|
||||
type ShipmentFeeBookDTO = {
|
||||
stockPointId?: number;
|
||||
sender?: string;
|
||||
startPhone?: string;
|
||||
startPostalCode?: string;
|
||||
pickupAddress?: string;
|
||||
shipperCountryCode?: string;
|
||||
receiver?: string;
|
||||
city?: string;
|
||||
province?: string;
|
||||
country?: string;
|
||||
postalCode?: string;
|
||||
deliveryAddress?: string;
|
||||
receiverPhone?: string;
|
||||
receiverEmail?: string;
|
||||
length?: number;
|
||||
width?: number;
|
||||
height?: number;
|
||||
dimensionUom?: string;
|
||||
weight?: number;
|
||||
weightUom?: string;
|
||||
};
|
||||
|
||||
type ShippingAddress = {
|
||||
id?: number;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
.selected-line-order-protable {
|
||||
background-color: #add8e6;
|
||||
}
|
||||
Loading…
Reference in New Issue