feat: 添加客户统计页面并更新物流信息显示
- 新增客户统计页面组件 - 在物流DTO中添加tracking_id字段注释 - 移除不再使用的cubejs-client依赖 - 修复店铺布局中的加载状态变量名 - 优化订单页面物流信息显示逻辑,支持更多字段展示
This commit is contained in:
parent
1fbfd95003
commit
3690fd00f7
|
|
@ -16,8 +16,6 @@
|
|||
"@ant-design/charts": "^2.2.6",
|
||||
"@ant-design/icons": "^5.0.1",
|
||||
"@ant-design/pro-components": "^2.4.4",
|
||||
"@cubejs-client/core": "^1.6.4",
|
||||
"@cubejs-client/react": "^1.6.4",
|
||||
"@fingerprintjs/fingerprintjs": "^4.6.2",
|
||||
"@monaco-editor/react": "^4.7.0",
|
||||
"@tinymce/tinymce-react": "^6.3.0",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
export default function Statistic() {
|
||||
return (
|
||||
<div>
|
||||
<h1>客户统计</h1>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@ const ShopLayout: React.FC = () => {
|
|||
|
||||
const fetchSites = async () => {
|
||||
try {
|
||||
setEditingSiteLoading(true);
|
||||
setLoading(true);
|
||||
const { data = [] } = await sitecontrollerAll();
|
||||
setSites(data);
|
||||
|
||||
|
|
@ -95,7 +95,7 @@ const ShopLayout: React.FC = () => {
|
|||
<Row gutter={16} style={{ height: 'calc(100vh - 100px)' }}>
|
||||
<Col span={4} style={{ height: '100%' }}>
|
||||
<Sider
|
||||
style={{ background: 'white', height: '100%', overflow: 'hidden',zIndex:1 }}
|
||||
style={{ background: 'white', height: '100%', overflow: 'hidden', zIndex: 1 }}
|
||||
>
|
||||
<div style={{ padding: '0 10px 16px' }}>
|
||||
<div
|
||||
|
|
@ -125,10 +125,10 @@ const ShopLayout: React.FC = () => {
|
|||
(site) => site.id === Number(siteId),
|
||||
);
|
||||
if (currentSite) {
|
||||
function normalizeEditing (site: SiteItem){
|
||||
function normalizeEditing(site: SiteItem) {
|
||||
return {
|
||||
...site,
|
||||
areas: site.areas?.map(area=>area.code) || [],
|
||||
areas: site.areas?.map(area => area.code) || [],
|
||||
}
|
||||
}
|
||||
setEditingSite(normalizeEditing(currentSite));
|
||||
|
|
|
|||
|
|
@ -228,21 +228,28 @@ const OrdersPage: React.FC = () => {
|
|||
// 遍历物流信息数组, 显示每个物流的提供商和单号
|
||||
return (
|
||||
<div>
|
||||
{record.fulfillments.map((item: any, index: number) => (
|
||||
{record.fulfillments.map((item, index: number) => (
|
||||
<div
|
||||
key={index}
|
||||
style={{ display: 'flex', flexDirection: 'column' }}
|
||||
>
|
||||
<span>
|
||||
{item.tracking_provider
|
||||
? `快递方式: ${item.tracking_provider}`
|
||||
{item.shipping_provider
|
||||
? `快递方式: ${item.shipping_provider}`
|
||||
: ''}
|
||||
</span>
|
||||
{
|
||||
item.shipping_method
|
||||
? `发货方式: ${item.shipping_method}`
|
||||
: ''
|
||||
}
|
||||
<span>
|
||||
{item.tracking_number
|
||||
? `物流单号: ${item.tracking_number}`
|
||||
: ''}
|
||||
</span>
|
||||
<span>
|
||||
{item.date_shipped ? `发货日期: ${item.date_shipped}` : ''}
|
||||
{item.date_created ? `发货日期: ${item.date_created}` : ''}
|
||||
</span>
|
||||
</div>
|
||||
))}
|
||||
|
|
|
|||
|
|
@ -456,6 +456,8 @@ declare namespace API {
|
|||
};
|
||||
|
||||
type FulfillmentDTO = {
|
||||
/** 物流id */
|
||||
tracking_id?: string;
|
||||
/** 物流单号 */
|
||||
tracking_number?: string;
|
||||
/** 物流公司 */
|
||||
|
|
|
|||
Loading…
Reference in New Issue