Compare commits
6 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
8d3c3ff71c | |
|
|
5f1c6eeb44 | |
|
|
0abe06d9df | |
|
|
860b7970c8 | |
|
|
67aa625785 | |
|
|
1d9838f72e |
|
|
@ -1,46 +0,0 @@
|
||||||
## 实现计划
|
|
||||||
|
|
||||||
### 1. 地图数据准备
|
|
||||||
- 获取加拿大和澳大利亚的省级地图数据(JSON格式)
|
|
||||||
- 将地图数据文件添加到项目的`public`目录下,命名为`canada.json`和`australia.json`
|
|
||||||
|
|
||||||
### 2. 组件实现
|
|
||||||
- 为加拿大创建地图组件:`/Users/zksu/Developer/work/workcode/WEB/src/pages/Area/Canada/index.tsx`
|
|
||||||
- 为澳大利亚创建地图组件:`/Users/zksu/Developer/work/workcode/WEB/src/pages/Area/Australia/index.tsx`
|
|
||||||
- 组件将基于现有的`Map/index.tsx`实现,修改地图数据加载和配置
|
|
||||||
|
|
||||||
### 3. 数据结构设计
|
|
||||||
- 定义省级数据接口,包含:
|
|
||||||
- 英文名称(用于匹配地图数据)
|
|
||||||
- 中文名称
|
|
||||||
- 简称
|
|
||||||
- 人口数据
|
|
||||||
|
|
||||||
### 4. 地图渲染配置
|
|
||||||
- 使用ECharts的Map组件渲染省级地图
|
|
||||||
- 配置tooltip显示中文名称、简称和人口数据
|
|
||||||
- 添加视觉映射组件,根据人口数据显示不同颜色
|
|
||||||
|
|
||||||
### 5. 数据获取与处理
|
|
||||||
- 定义本地数据结构,包含各个省的中文名称、简称和人口
|
|
||||||
- 将数据转换为ECharts需要的格式
|
|
||||||
|
|
||||||
### 6. 组件优化
|
|
||||||
- 添加加载状态
|
|
||||||
- 处理地图数据加载失败的情况
|
|
||||||
- 优化地图交互体验,如缩放、拖拽等
|
|
||||||
|
|
||||||
### 7. 实现步骤
|
|
||||||
1. 准备地图数据文件
|
|
||||||
2. 创建加拿大地图组件
|
|
||||||
3. 创建澳大利亚地图组件
|
|
||||||
4. 配置地图数据和样式
|
|
||||||
5. 添加省级数据
|
|
||||||
6. 测试地图渲染和交互
|
|
||||||
|
|
||||||
### 技术要点
|
|
||||||
- 使用ECharts的MapChart组件
|
|
||||||
- 动态加载地图JSON数据
|
|
||||||
- 数据映射和转换
|
|
||||||
- Tooltip自定义格式化
|
|
||||||
- 视觉映射配置
|
|
||||||
10
.umirc.ts
10
.umirc.ts
|
|
@ -60,16 +60,6 @@ export default defineConfig({
|
||||||
path: '/area/map',
|
path: '/area/map',
|
||||||
component: './Area/Map',
|
component: './Area/Map',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: '加拿大地图',
|
|
||||||
path: '/area/canada',
|
|
||||||
component: './Area/Canada',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '澳大利亚地图',
|
|
||||||
path: '/area/australia',
|
|
||||||
component: './Area/Australia',
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
26628
public/canada.json
26628
public/canada.json
File diff suppressed because it is too large
Load Diff
|
|
@ -1,149 +0,0 @@
|
||||||
import { Spin, message } from 'antd';
|
|
||||||
import ReactECharts from 'echarts-for-react';
|
|
||||||
import { MapChart } from 'echarts/charts';
|
|
||||||
import { TooltipComponent, VisualMapComponent } from 'echarts/components';
|
|
||||||
import * as echarts from 'echarts/core';
|
|
||||||
import { CanvasRenderer } from 'echarts/renderers';
|
|
||||||
import React, { useEffect, useState } from 'react';
|
|
||||||
|
|
||||||
// 注册 ECharts 组件
|
|
||||||
echarts.use([TooltipComponent, VisualMapComponent, MapChart, CanvasRenderer]);
|
|
||||||
|
|
||||||
interface ProvinceData {
|
|
||||||
name: string; // 英文名称(用于匹配地图)
|
|
||||||
chineseName: string; // 中文名称
|
|
||||||
shortName: string; // 简称
|
|
||||||
population: number; // 人口数据
|
|
||||||
}
|
|
||||||
|
|
||||||
const AustraliaMap: React.FC = () => {
|
|
||||||
const [option, setOption] = useState({});
|
|
||||||
const [loading, setLoading] = useState(true);
|
|
||||||
|
|
||||||
// 澳大利亚省级数据
|
|
||||||
const provinceData: ProvinceData[] = [
|
|
||||||
{ name: 'New South Wales', chineseName: '新南威尔士州', shortName: 'NSW', population: 8166369 },
|
|
||||||
{ name: 'Victoria', chineseName: '维多利亚州', shortName: 'VIC', population: 6704352 },
|
|
||||||
{ name: 'Queensland', chineseName: '昆士兰州', shortName: 'QLD', population: 5265049 },
|
|
||||||
{ name: 'Western Australia', chineseName: '西澳大利亚州', shortName: 'WA', population: 2885548 },
|
|
||||||
{ name: 'South Australia', chineseName: '南澳大利亚州', shortName: 'SA', population: 1806604 },
|
|
||||||
{ name: 'Tasmania', chineseName: '塔斯马尼亚州', shortName: 'TAS', population: 569825 },
|
|
||||||
{ name: 'Australian Capital Territory', chineseName: '澳大利亚首都领地', shortName: 'ACT', population: 453349 },
|
|
||||||
{ name: 'Northern Territory', chineseName: '北领地', shortName: 'NT', population: 249072 },
|
|
||||||
];
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const fetchAndSetMapData = async () => {
|
|
||||||
try {
|
|
||||||
// 加载澳大利亚地图数据
|
|
||||||
const australiaMapResponse = await fetch('/australia.json');
|
|
||||||
const australiaMap = await australiaMapResponse.json();
|
|
||||||
echarts.registerMap('australia', australiaMap);
|
|
||||||
|
|
||||||
// 将省级数据转换为 ECharts 需要的格式
|
|
||||||
const mapData = provinceData.map((province) => ({
|
|
||||||
name: province.name,
|
|
||||||
value: province.population,
|
|
||||||
chineseName: province.chineseName,
|
|
||||||
shortName: province.shortName,
|
|
||||||
population: province.population,
|
|
||||||
}));
|
|
||||||
|
|
||||||
// 配置 ECharts 地图选项
|
|
||||||
const mapOption = {
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'item',
|
|
||||||
formatter: (params: any) => {
|
|
||||||
if (params.data) {
|
|
||||||
return `
|
|
||||||
<div>
|
|
||||||
<div><strong>${params.data.chineseName}</strong> (${params.data.shortName})</div>
|
|
||||||
<div>人口: ${params.data.population.toLocaleString()}</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
return `${params.name}`;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
visualMap: {
|
|
||||||
left: 'left',
|
|
||||||
min: Math.min(...provinceData.map(p => p.population)),
|
|
||||||
max: Math.max(...provinceData.map(p => p.population)),
|
|
||||||
inRange: {
|
|
||||||
color: ['#f0f0f0', '#52c41a', '#389e0d'],
|
|
||||||
},
|
|
||||||
calculable: true,
|
|
||||||
orient: 'vertical',
|
|
||||||
left: 'right',
|
|
||||||
top: 'center',
|
|
||||||
text: ['人口多', '人口少'],
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: 'Australia States',
|
|
||||||
type: 'map',
|
|
||||||
map: 'australia',
|
|
||||||
roam: true,
|
|
||||||
nameProperty: 'STATE_NAME', // 指定地图数据中用于匹配的字段
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
formatter: (params: any) => {
|
|
||||||
if (params.data) {
|
|
||||||
return `${params.data.shortName}\n${params.data.chineseName}\n${params.data.population.toLocaleString()}`;
|
|
||||||
}
|
|
||||||
return params.name;
|
|
||||||
},
|
|
||||||
fontSize: 12,
|
|
||||||
color: '#333',
|
|
||||||
fontWeight: 'bold',
|
|
||||||
},
|
|
||||||
emphasis: {
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
},
|
|
||||||
itemStyle: {
|
|
||||||
areaColor: '#ffc107',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data: mapData,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
|
|
||||||
setOption(mapOption);
|
|
||||||
} catch (error: any) {
|
|
||||||
message.error(`加载地图数据失败: ${error.message}`);
|
|
||||||
} finally {
|
|
||||||
setLoading(false);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
fetchAndSetMapData();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
if (loading) {
|
|
||||||
return (
|
|
||||||
<Spin
|
|
||||||
size="large"
|
|
||||||
style={{
|
|
||||||
display: 'flex',
|
|
||||||
justifyContent: 'center',
|
|
||||||
alignItems: 'center',
|
|
||||||
height: '80vh',
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ReactECharts
|
|
||||||
echarts={echarts}
|
|
||||||
option={option}
|
|
||||||
style={{ height: '80vh', width: '100%' }}
|
|
||||||
notMerge={true}
|
|
||||||
lazyUpdate={true}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default AustraliaMap;
|
|
||||||
|
|
@ -1,153 +0,0 @@
|
||||||
import { Spin, message } from 'antd';
|
|
||||||
import ReactECharts from 'echarts-for-react';
|
|
||||||
import { MapChart } from 'echarts/charts';
|
|
||||||
import { TooltipComponent, VisualMapComponent } from 'echarts/components';
|
|
||||||
import * as echarts from 'echarts/core';
|
|
||||||
import { CanvasRenderer } from 'echarts/renderers';
|
|
||||||
import React, { useEffect, useState } from 'react';
|
|
||||||
|
|
||||||
// 注册 ECharts 组件
|
|
||||||
echarts.use([TooltipComponent, VisualMapComponent, MapChart, CanvasRenderer]);
|
|
||||||
|
|
||||||
interface ProvinceData {
|
|
||||||
name: string; // 英文名称(用于匹配地图)
|
|
||||||
chineseName: string; // 中文名称
|
|
||||||
shortName: string; // 简称
|
|
||||||
population: number; // 人口数据
|
|
||||||
}
|
|
||||||
|
|
||||||
const CanadaMap: React.FC = () => {
|
|
||||||
const [option, setOption] = useState({});
|
|
||||||
const [loading, setLoading] = useState(true);
|
|
||||||
|
|
||||||
// 加拿大省级数据
|
|
||||||
const provinceData: ProvinceData[] = [
|
|
||||||
{ name: 'British Columbia', chineseName: '不列颠哥伦比亚省', shortName: 'BC', population: 5147712 },
|
|
||||||
{ name: 'Alberta', chineseName: '阿尔伯塔省', shortName: 'AB', population: 4413146 },
|
|
||||||
{ name: 'Saskatchewan', chineseName: '萨斯喀彻温省', shortName: 'SK', population: 1181666 },
|
|
||||||
{ name: 'Manitoba', chineseName: '曼尼托巴省', shortName: 'MB', population: 1383765 },
|
|
||||||
{ name: 'Ontario', chineseName: '安大略省', shortName: 'ON', population: 14711827 },
|
|
||||||
{ name: 'Quebec', chineseName: '魁北克省', shortName: 'QC', population: 8501833 },
|
|
||||||
{ name: 'New Brunswick', chineseName: '新不伦瑞克省', shortName: 'NB', population: 789225 },
|
|
||||||
{ name: 'Nova Scotia', chineseName: '新斯科舍省', shortName: 'NS', population: 971395 },
|
|
||||||
{ name: 'Prince Edward Island', chineseName: '爱德华王子岛省', shortName: 'PE', population: 160302 },
|
|
||||||
{ name: 'Newfoundland and Labrador', chineseName: '纽芬兰与拉布拉多省', shortName: 'NL', population: 521365 },
|
|
||||||
{ name: 'Yukon', chineseName: '育空地区', shortName: 'YT', population: 43985 },
|
|
||||||
{ name: 'Northwest Territories', chineseName: '西北地区', shortName: 'NT', population: 45515 },
|
|
||||||
{ name: 'Nunavut', chineseName: '努纳武特地区', shortName: 'NU', population: 39430 },
|
|
||||||
];
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const fetchAndSetMapData = async () => {
|
|
||||||
try {
|
|
||||||
// 加载加拿大地图数据
|
|
||||||
const canadaMapResponse = await fetch('/canada.json');
|
|
||||||
const canadaMap = await canadaMapResponse.json();
|
|
||||||
echarts.registerMap('canada', canadaMap);
|
|
||||||
|
|
||||||
// 将省级数据转换为 ECharts 需要的格式
|
|
||||||
const mapData = provinceData.map((province) => ({
|
|
||||||
name: province.name,
|
|
||||||
value: province.population,
|
|
||||||
chineseName: province.chineseName,
|
|
||||||
shortName: province.shortName,
|
|
||||||
population: province.population,
|
|
||||||
}));
|
|
||||||
|
|
||||||
// 配置 ECharts 地图选项
|
|
||||||
const mapOption = {
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'item',
|
|
||||||
formatter: (params: any) => {
|
|
||||||
if (params.data) {
|
|
||||||
return `
|
|
||||||
<div>
|
|
||||||
<div><strong>${params.data.chineseName}</strong> (${params.data.shortName})</div>
|
|
||||||
<div>人口: ${params.data.population.toLocaleString()}</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
return `${params.name}`;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
visualMap: {
|
|
||||||
left: 'left',
|
|
||||||
min: Math.min(...provinceData.map(p => p.population)),
|
|
||||||
max: Math.max(...provinceData.map(p => p.population)),
|
|
||||||
inRange: {
|
|
||||||
color: ['#f0f0f0', '#1890ff', '#096dd9'],
|
|
||||||
},
|
|
||||||
calculable: true,
|
|
||||||
orient: 'vertical',
|
|
||||||
left: 'right',
|
|
||||||
top: 'center',
|
|
||||||
text: ['人口多', '人口少'],
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: 'Canada Provinces',
|
|
||||||
type: 'map',
|
|
||||||
map: 'canada',
|
|
||||||
roam: true,
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
formatter: (params: any) => {
|
|
||||||
if (params.data) {
|
|
||||||
return `${params.data.shortName}\n${params.data.chineseName}\n${params.data.population.toLocaleString()}`;
|
|
||||||
}
|
|
||||||
return params.name;
|
|
||||||
},
|
|
||||||
fontSize: 12,
|
|
||||||
color: '#333',
|
|
||||||
fontWeight: 'bold',
|
|
||||||
},
|
|
||||||
emphasis: {
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
},
|
|
||||||
itemStyle: {
|
|
||||||
areaColor: '#ffc107',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data: mapData,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
|
|
||||||
setOption(mapOption);
|
|
||||||
} catch (error: any) {
|
|
||||||
message.error(`加载地图数据失败: ${error.message}`);
|
|
||||||
} finally {
|
|
||||||
setLoading(false);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
fetchAndSetMapData();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
if (loading) {
|
|
||||||
return (
|
|
||||||
<Spin
|
|
||||||
size="large"
|
|
||||||
style={{
|
|
||||||
display: 'flex',
|
|
||||||
justifyContent: 'center',
|
|
||||||
alignItems: 'center',
|
|
||||||
height: '80vh',
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ReactECharts
|
|
||||||
echarts={echarts}
|
|
||||||
option={option}
|
|
||||||
style={{ height: '80vh', width: '100%' }}
|
|
||||||
notMerge={true}
|
|
||||||
lazyUpdate={true}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default CanadaMap;
|
|
||||||
|
|
@ -393,6 +393,14 @@ const UpdateForm: React.FC<{
|
||||||
}));
|
}));
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
<ProFormText
|
||||||
|
name={['email']}
|
||||||
|
label="邮箱"
|
||||||
|
width="lg"
|
||||||
|
placeholder="请输入邮箱"
|
||||||
|
required
|
||||||
|
rules={[{ required: true, message: '请输入邮箱' }]}
|
||||||
|
/>
|
||||||
<ProForm.Group title="地址">
|
<ProForm.Group title="地址">
|
||||||
<ProFormText
|
<ProFormText
|
||||||
name={['address', 'country']}
|
name={['address', 'country']}
|
||||||
|
|
@ -431,6 +439,8 @@ const UpdateForm: React.FC<{
|
||||||
required
|
required
|
||||||
rules={[{ required: true, message: '请输入详细地址' }]}
|
rules={[{ required: true, message: '请输入详细地址' }]}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
</ProForm.Group>
|
</ProForm.Group>
|
||||||
<ProFormItem
|
<ProFormItem
|
||||||
name="contact"
|
name="contact"
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ import {
|
||||||
} from 'antd';
|
} from 'antd';
|
||||||
import React, { useMemo, useRef, useState } from 'react';
|
import React, { useMemo, useRef, useState } from 'react';
|
||||||
import RelatedOrders from '../../Subscription/Orders/RelatedOrders';
|
import RelatedOrders from '../../Subscription/Orders/RelatedOrders';
|
||||||
|
import dayjs from 'dayjs';
|
||||||
|
|
||||||
const ListPage: React.FC = () => {
|
const ListPage: React.FC = () => {
|
||||||
const actionRef = useRef<ActionType>();
|
const actionRef = useRef<ActionType>();
|
||||||
|
|
@ -1267,7 +1268,10 @@ const Shipping: React.FC<{
|
||||||
const [rates, setRates] = useState<API.RateDTO[]>([]);
|
const [rates, setRates] = useState<API.RateDTO[]>([]);
|
||||||
const [ratesLoading, setRatesLoading] = useState(false);
|
const [ratesLoading, setRatesLoading] = useState(false);
|
||||||
const { message } = App.useApp();
|
const { message } = App.useApp();
|
||||||
|
const [shipmentPlatforms, setShipmentPlatforms] = useState([
|
||||||
|
{ label: 'uniuni', value: 'uniuni' },
|
||||||
|
{ label: 'tms.freightwaves', value: 'freightwaves' },
|
||||||
|
]);
|
||||||
return (
|
return (
|
||||||
<ModalForm
|
<ModalForm
|
||||||
formRef={formRef}
|
formRef={formRef}
|
||||||
|
|
@ -1296,6 +1300,7 @@ const Shipping: React.FC<{
|
||||||
await ordercontrollerGetorderdetail({
|
await ordercontrollerGetorderdetail({
|
||||||
orderId: id,
|
orderId: id,
|
||||||
});
|
});
|
||||||
|
console.log('success data',success,data)
|
||||||
if (!success || !data) return {};
|
if (!success || !data) return {};
|
||||||
data.sales = data.sales?.reduce(
|
data.sales = data.sales?.reduce(
|
||||||
(acc: API.OrderSale[], cur: API.OrderSale) => {
|
(acc: API.OrderSale[], cur: API.OrderSale) => {
|
||||||
|
|
@ -1318,7 +1323,8 @@ const Shipping: React.FC<{
|
||||||
if (reShipping) data.sales = [{}];
|
if (reShipping) data.sales = [{}];
|
||||||
let shipmentInfo = localStorage.getItem('shipmentInfo');
|
let shipmentInfo = localStorage.getItem('shipmentInfo');
|
||||||
if (shipmentInfo) shipmentInfo = JSON.parse(shipmentInfo);
|
if (shipmentInfo) shipmentInfo = JSON.parse(shipmentInfo);
|
||||||
return {
|
const a = {
|
||||||
|
shipmentPlatform: 'uniuni',
|
||||||
...data,
|
...data,
|
||||||
// payment_method_id: shipmentInfo?.payment_method_id,
|
// payment_method_id: shipmentInfo?.payment_method_id,
|
||||||
stockPointId: shipmentInfo?.stockPointId,
|
stockPointId: shipmentInfo?.stockPointId,
|
||||||
|
|
@ -1378,6 +1384,7 @@ const Shipping: React.FC<{
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
return a
|
||||||
}}
|
}}
|
||||||
onFinish={async ({
|
onFinish={async ({
|
||||||
customer_note,
|
customer_note,
|
||||||
|
|
@ -1441,7 +1448,18 @@ const Shipping: React.FC<{
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ProFormText label="订单号" readonly name={'externalOrderId'} />
|
<Row gutter={16}>
|
||||||
|
<Col span={8}>
|
||||||
|
<ProFormSelect
|
||||||
|
name="shipmentPlatform"
|
||||||
|
label="发货平台"
|
||||||
|
options={shipmentPlatforms}
|
||||||
|
placeholder="请选择发货平台"
|
||||||
|
rules={[{ required: true, message: '请选择一个选项' }]}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
<ProFormText label="订单号" readonly name='externalOrderId' />
|
||||||
<ProFormText label="客户备注" readonly name="customer_note" />
|
<ProFormText label="客户备注" readonly name="customer_note" />
|
||||||
<ProFormList
|
<ProFormList
|
||||||
label="后台备注"
|
label="后台备注"
|
||||||
|
|
@ -1573,16 +1591,21 @@ const Shipping: React.FC<{
|
||||||
title="发货信息"
|
title="发货信息"
|
||||||
extra={
|
extra={
|
||||||
<AddressPicker
|
<AddressPicker
|
||||||
onChange={({
|
onChange={(row) => {
|
||||||
address,
|
console.log(row);
|
||||||
phone_number,
|
const {
|
||||||
phone_number_extension,
|
address,
|
||||||
stockPointId,
|
phone_number,
|
||||||
}) => {
|
phone_number_extension,
|
||||||
|
stockPointId,
|
||||||
|
email,
|
||||||
|
} = row;
|
||||||
formRef?.current?.setFieldsValue({
|
formRef?.current?.setFieldsValue({
|
||||||
stockPointId,
|
stockPointId,
|
||||||
|
// address_id: row.id,
|
||||||
details: {
|
details: {
|
||||||
origin: {
|
origin: {
|
||||||
|
email_addresses:email,
|
||||||
address,
|
address,
|
||||||
phone_number: {
|
phone_number: {
|
||||||
phone: phone_number,
|
phone: phone_number,
|
||||||
|
|
@ -1595,6 +1618,11 @@ const Shipping: React.FC<{
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
{/* <ProFormText
|
||||||
|
label="address_id"
|
||||||
|
name={'address_id'}
|
||||||
|
rules={[{ required: true, message: '请输入ID' }]}
|
||||||
|
/> */}
|
||||||
<ProFormSelect
|
<ProFormSelect
|
||||||
name="stockPointId"
|
name="stockPointId"
|
||||||
width="md"
|
width="md"
|
||||||
|
|
@ -1687,7 +1715,6 @@ const Shipping: React.FC<{
|
||||||
<ProFormText
|
<ProFormText
|
||||||
label="公司名称"
|
label="公司名称"
|
||||||
name={['details', 'destination', 'name']}
|
name={['details', 'destination', 'name']}
|
||||||
rules={[{ required: true, message: '请输入公司名称' }]}
|
|
||||||
/>
|
/>
|
||||||
<ProFormItem
|
<ProFormItem
|
||||||
name={['details', 'destination', 'address', 'country']}
|
name={['details', 'destination', 'address', 'country']}
|
||||||
|
|
@ -2017,6 +2044,7 @@ const Shipping: React.FC<{
|
||||||
details.origin.phone_number.number =
|
details.origin.phone_number.number =
|
||||||
details.origin.phone_number.phone;
|
details.origin.phone_number.phone;
|
||||||
const res = await logisticscontrollerGetshipmentfee({
|
const res = await logisticscontrollerGetshipmentfee({
|
||||||
|
shipmentPlatform: data.shipmentPlatform,
|
||||||
stockPointId: data.stockPointId,
|
stockPointId: data.stockPointId,
|
||||||
|
|
||||||
sender: details.origin.contact_name,
|
sender: details.origin.contact_name,
|
||||||
|
|
@ -2343,7 +2371,7 @@ const CreateOrder: React.FC<{
|
||||||
<ProFormText
|
<ProFormText
|
||||||
label="公司名称"
|
label="公司名称"
|
||||||
name={['billing', 'company']}
|
name={['billing', 'company']}
|
||||||
rules={[{ required: true, message: '请输入公司名称' }]}
|
rules={[{ message: '请输入公司名称' }]}
|
||||||
/>
|
/>
|
||||||
<ProFormItem
|
<ProFormItem
|
||||||
name={['billing', 'country']}
|
name={['billing', 'country']}
|
||||||
|
|
@ -2429,6 +2457,11 @@ const AddressPicker: React.FC<{
|
||||||
value: item.id,
|
value: item.id,
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'id',
|
||||||
|
dataIndex: ['id'],
|
||||||
|
hideInSearch: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '地区',
|
title: '地区',
|
||||||
|
|
@ -2456,6 +2489,11 @@ const AddressPicker: React.FC<{
|
||||||
`+${record.phone_number_extension} ${record.phone_number}`,
|
`+${record.phone_number_extension} ${record.phone_number}`,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '邮箱',
|
||||||
|
dataIndex: [ 'email'],
|
||||||
|
hideInSearch: true,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
<ModalForm
|
<ModalForm
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ const ListPage: React.FC = () => {
|
||||||
hideInTable: true,
|
hideInTable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '产品sku',
|
title: '产品名称',
|
||||||
dataIndex: 'sku',
|
dataIndex: 'sku',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1627,9 +1627,11 @@ declare namespace API {
|
||||||
details?: ShippingDetailsDTO;
|
details?: ShippingDetailsDTO;
|
||||||
stockPointId?: number;
|
stockPointId?: number;
|
||||||
orderIds?: number[];
|
orderIds?: number[];
|
||||||
|
shipmentPlatform?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
type ShipmentFeeBookDTO = {
|
type ShipmentFeeBookDTO = {
|
||||||
|
shipmentPlatform?: string;
|
||||||
stockPointId?: number;
|
stockPointId?: number;
|
||||||
sender?: string;
|
sender?: string;
|
||||||
startPhone?: string;
|
startPhone?: string;
|
||||||
|
|
@ -1650,6 +1652,7 @@ declare namespace API {
|
||||||
dimensionUom?: string;
|
dimensionUom?: string;
|
||||||
weight?: number;
|
weight?: number;
|
||||||
weightUom?: string;
|
weightUom?: string;
|
||||||
|
address_id?: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
type ShippingAddress = {
|
type ShippingAddress = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue