Compare commits
2 Commits
d0097aec38
...
f8c3e29792
| Author | SHA1 | Date |
|---|---|---|
|
|
f8c3e29792 | |
|
|
3bd68583ee |
|
|
@ -215,17 +215,11 @@ const ListPage: React.FC = () => {
|
||||||
dataIndex: 'externalOrderId',
|
dataIndex: 'externalOrderId',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '订单创建日期',
|
title: '订单日期',
|
||||||
dataIndex: 'date_created',
|
dataIndex: 'date_created',
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
valueType: 'dateTime',
|
valueType: 'dateTime',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '付款日期',
|
|
||||||
dataIndex: 'date_paid',
|
|
||||||
hideInSearch: true,
|
|
||||||
valueType: 'dateTime',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '金额',
|
title: '金额',
|
||||||
dataIndex: 'total',
|
dataIndex: 'total',
|
||||||
|
|
|
||||||
|
|
@ -202,8 +202,6 @@ const SiteList: React.FC = () => {
|
||||||
</a>
|
</a>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{ title: 'webhook地址', dataIndex: 'webhookUrl', width: 280, hideInSearch: true },
|
|
||||||
|
|
||||||
{
|
{
|
||||||
title: 'SKU 前缀',
|
title: 'SKU 前缀',
|
||||||
dataIndex: 'skuPrefix',
|
dataIndex: 'skuPrefix',
|
||||||
|
|
|
||||||
|
|
@ -100,11 +100,6 @@ const EditSiteForm: React.FC<EditSiteFormProps> = ({
|
||||||
label="网站地址"
|
label="网站地址"
|
||||||
placeholder="请输入网站地址"
|
placeholder="请输入网站地址"
|
||||||
/>
|
/>
|
||||||
<ProFormText
|
|
||||||
name="webhookUrl"
|
|
||||||
label="Webhook 地址"
|
|
||||||
placeholder="请输入 Webhook 地址"
|
|
||||||
/>
|
|
||||||
<ProFormSelect
|
<ProFormSelect
|
||||||
name="type"
|
name="type"
|
||||||
label="平台"
|
label="平台"
|
||||||
|
|
@ -169,7 +164,6 @@ const EditSiteForm: React.FC<EditSiteFormProps> = ({
|
||||||
label="区域"
|
label="区域"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
placeholder="请选择区域"
|
placeholder="请选择区域"
|
||||||
|
|
||||||
showSearch
|
showSearch
|
||||||
filterOption={(input, option) =>
|
filterOption={(input, option) =>
|
||||||
(option?.label ?? '').toLowerCase().includes(input.toLowerCase())
|
(option?.label ?? '').toLowerCase().includes(input.toLowerCase())
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ import { ORDER_STATUS_ENUM } from '@/constants';
|
||||||
import { AddTag } from '@/pages/Customer/List';
|
import { AddTag } from '@/pages/Customer/List';
|
||||||
import { customercontrollerDeltag } from '@/servers/api/customer';
|
import { customercontrollerDeltag } from '@/servers/api/customer';
|
||||||
import { sitecontrollerAll } from '@/servers/api/site';
|
import { sitecontrollerAll } from '@/servers/api/site';
|
||||||
import * as countries from 'i18n-iso-countries';
|
|
||||||
import {
|
import {
|
||||||
statisticscontrollerGetorderbydate,
|
statisticscontrollerGetorderbydate,
|
||||||
statisticscontrollerGetorderbyemail,
|
statisticscontrollerGetorderbyemail,
|
||||||
|
|
@ -39,17 +38,6 @@ const highlightText = (text: string, keyword: string) => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取所有国家/地区的选项
|
|
||||||
const getCountryOptions = () => {
|
|
||||||
// 获取所有国家的 ISO 代码
|
|
||||||
const countryCodes = countries.getAlpha2Codes();
|
|
||||||
// 将国家代码转换为选项数组
|
|
||||||
return Object.keys(countryCodes).map((code) => ({
|
|
||||||
label: countries.getName(code, 'zh') || code, // 使用中文名称, 如果没有则使用代码
|
|
||||||
value: code,
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
|
|
||||||
const ListPage: React.FC = () => {
|
const ListPage: React.FC = () => {
|
||||||
const [xAxis, setXAxis] = useState([]);
|
const [xAxis, setXAxis] = useState([]);
|
||||||
const [series, setSeries] = useState<any[]>([]);
|
const [series, setSeries] = useState<any[]>([]);
|
||||||
|
|
@ -634,19 +622,6 @@ const ListPage: React.FC = () => {
|
||||||
}));
|
}));
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ProFormSelect
|
|
||||||
name="country"
|
|
||||||
label="区域"
|
|
||||||
mode="multiple"
|
|
||||||
placeholder="请选择区域"
|
|
||||||
|
|
||||||
showSearch
|
|
||||||
filterOption={(input, option) =>
|
|
||||||
(option?.label ?? '').toLowerCase().includes(input.toLowerCase())
|
|
||||||
}
|
|
||||||
options={getCountryOptions()}
|
|
||||||
/>
|
|
||||||
{/* <ProFormSelect
|
{/* <ProFormSelect
|
||||||
label="类型"
|
label="类型"
|
||||||
name="purchaseType"
|
name="purchaseType"
|
||||||
|
|
|
||||||
|
|
@ -9,28 +9,18 @@ import {
|
||||||
PageContainer,
|
PageContainer,
|
||||||
ProColumns,
|
ProColumns,
|
||||||
ProTable,
|
ProTable,
|
||||||
ProForm,
|
|
||||||
ProFormSelect,
|
|
||||||
} from '@ant-design/pro-components';
|
} from '@ant-design/pro-components';
|
||||||
import { Space, Tag } from 'antd';
|
import { Space, Tag } from 'antd';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import ReactECharts from 'echarts-for-react';
|
import ReactECharts from 'echarts-for-react';
|
||||||
import { HistoryOrder } from '../Order';
|
import { HistoryOrder } from '../Order';
|
||||||
import * as countries from 'i18n-iso-countries';
|
|
||||||
import zhCN from 'i18n-iso-countries/langs/zh';
|
|
||||||
countries.registerLocale(zhCN);
|
|
||||||
const ListPage: React.FC = () => {
|
const ListPage: React.FC = () => {
|
||||||
const [data, setData] = useState({});
|
const [data, setData] = useState({});
|
||||||
const initialValues = {
|
|
||||||
country: ['CA'],
|
useEffect(() => {
|
||||||
};
|
statisticscontrollerGetordersorce().then(({ data, success }) => {
|
||||||
function handleSubmit(values: typeof initialValues) {
|
|
||||||
statisticscontrollerGetordersorce({params: values}).then(({ data, success }) => {
|
|
||||||
if (success) setData(data);
|
if (success) setData(data);
|
||||||
});
|
});
|
||||||
}
|
|
||||||
useEffect(() => {
|
|
||||||
handleSubmit(initialValues)
|
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const option = useMemo(() => {
|
const option = useMemo(() => {
|
||||||
|
|
@ -287,29 +277,9 @@ const ListPage: React.FC = () => {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PageContainer ghost>
|
<PageContainer ghost>
|
||||||
<ProForm
|
|
||||||
initialValues={initialValues}
|
|
||||||
layout="inline"
|
|
||||||
onFinish={handleSubmit}
|
|
||||||
>
|
|
||||||
|
|
||||||
<ProFormSelect
|
|
||||||
name="country"
|
|
||||||
label="区域"
|
|
||||||
mode="multiple"
|
|
||||||
placeholder="请选择区域"
|
|
||||||
showSearch
|
|
||||||
filterOption={(input, option) =>
|
|
||||||
(option?.label ?? '').toLowerCase().includes(input.toLowerCase())
|
|
||||||
}
|
|
||||||
options={getCountryOptions()}
|
|
||||||
/>
|
|
||||||
</ProForm>
|
|
||||||
<ReactECharts
|
<ReactECharts
|
||||||
option={option}
|
option={option}
|
||||||
style={{ height: 1050 }}
|
style={{ height: 1050 }}
|
||||||
|
|
@ -326,7 +296,6 @@ const ListPage: React.FC = () => {
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{tableData?.length ? (
|
{tableData?.length ? (
|
||||||
<ProTable
|
<ProTable
|
||||||
search={false}
|
search={false}
|
||||||
|
|
@ -343,17 +312,4 @@ const ListPage: React.FC = () => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 获取所有国家/地区的选项
|
|
||||||
const getCountryOptions = () => {
|
|
||||||
// 获取所有国家的 ISO 代码
|
|
||||||
const countryCodes = countries.getAlpha2Codes();
|
|
||||||
// 将国家代码转换为选项数组
|
|
||||||
|
|
||||||
return Object.keys(countryCodes).map((code) => ({
|
|
||||||
label: countries.getName(code, 'zh') || code, // 使用中文名称, 如果没有则使用代码
|
|
||||||
value: code,
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
export default ListPage;
|
export default ListPage;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue