@appthen/cli 1.2.10 → 1.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitignore +1 -0
- package/bin/main.js +92 -0
- package/dist/index.js +7014 -14988
- package/package.json +8 -1
- package/tests/test-app/.appthen/shadow-space-100001-test-app-e99876b1.json +1862 -0
- package/tests/test-app/.appthen/space-config.json +8 -0
- package/tests/test-app/docs/AI-Workflow.flow +112 -0
- package/tests/test-app/docs/Logic-1.flow +16 -0
- package/tests/test-app/docs/Logic.flow +16 -0
- package/tests/test-app/docs/Project-Blueprint-1.flow +119 -0
- package/tests/test-app/docs/Project-Blueprint.flow +119 -0
- package/tests/test-app/docs/README.md +3 -0
- package/tests/test-app/docs/claude.md +194 -0
- package/tests/test-app/docs/page_requirement_analysis.md +149 -0
- package/tests/test-app/docs//345/267/245/345/215/225/347/256/241/347/220/206/347/263/273/347/273/237/350/257/246/347/273/206/350/256/276/350/256/241.md +377 -0
- package/tests/test-app/src/apis/AddTodoPost.api.ts +42 -0
- package/tests/test-app/src/apis/DeleteTodoPost.api.ts +32 -0
- package/tests/test-app/src/apis/GetListPost.api.ts +38 -0
- package/tests/test-app/src/apis/TicketAttachmentUploadPost.api.ts +42 -0
- package/tests/test-app/src/apis/UpdateTodoPost.api.ts +46 -0
- package/tests/test-app/src/app.css +15 -0
- package/tests/test-app/src/cloud_functions/ticket|attachment|upload.node.ts +86 -0
- package/tests/test-app/src/cloud_functions/ticket|comment|add.node.ts +65 -0
- package/tests/test-app/src/cloud_functions/types|entity|Ticket.node.ts +88 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketAttachment.node.ts +70 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketCategory.node.ts +56 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketComment.node.ts +62 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketHistory.node.ts +74 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketPriority.node.ts +68 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketStatus.node.ts +63 -0
- package/tests/test-app/src/cloud_functions/types|models|CreateTicketParams.node.ts +20 -0
- package/tests/test-app/src/cloud_functions/types|models|TicketListParams.node.ts +30 -0
- package/tests/test-app/src/cloud_functions/types|models|UpdateTicketParams.node.ts +22 -0
- package/tests/test-app/src/components/Button.js +11 -0
- package/tests/test-app/src/components/MessageCenter.tsx +506 -0
- package/tests/test-app/src/components/MouduleDemoNzp.tsx +40 -0
- package/tests/test-app/src/components/Timeline.tsx +145 -0
- package/tests/test-app/src/index.ts +2 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketCommentAddPost.api.ts +48 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketCreatePost.api.ts +52 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketDeleteDelete.api.ts +39 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketDetailGet.api.ts +39 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketListGet.api.ts +61 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketUpdatePut.api.ts +57 -0
- package/tests/test-app/src/modules/work_order_module/apis/TrainDoorFaultListGet.ts +76 -0
- package/tests/test-app/src/modules/work_order_module/apis/TrainDoorListGet.ts +76 -0
- package/tests/test-app/src/modules/work_order_module/apis/TrainDoorOperationRecordsGet.ts +284 -0
- package/tests/test-app/src/modules/work_order_module/apis/TrainDoorStatisticsGet.ts +96 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/category|list.node.ts +40 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/priority|list.node.ts +26 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/status|list.node.ts +26 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|create.node.ts +54 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|delete.node.ts +55 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|detail.node.ts +65 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|list.node.ts +85 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|update.node.ts +73 -0
- package/tests/test-app/src/modules/work_order_module/data_model/Ticket.m.ts +85 -0
- package/tests/test-app/src/modules/work_order_module/data_model/TicketCategory.m.ts +53 -0
- package/tests/test-app/src/modules/work_order_module/data_model/TicketStatus.m.ts +60 -0
- package/tests/test-app/src/modules/work_order_module//345/267/245/345/215/225/347/263/273/347/273/237/344/272/247/345/223/201/350/256/276/350/256/241/346/226/207/346/241/243.md +301 -0
- package/tests/test-app/src/modules/work_order_module//345/267/245/345/215/225/347/263/273/347/273/237/345/274/200/345/217/221/344/273/273/345/212/241/345/210/206/345/267/245/346/226/207/346/241/243.md +345 -0
- package/tests/test-app/src/pages/CustomerManagement.tsx +535 -0
- package/tests/test-app/src/pages/CyberpunkDashboard.tsx +348 -0
- package/tests/test-app/src/pages/CyberpunkProductManagement.tsx +637 -0
- package/tests/test-app/src/pages/CyberpunkUserList.tsx +316 -0
- package/tests/test-app/src/pages/DashboardV2.tsx +334 -0
- package/tests/test-app/src/pages/DataReport.tsx +298 -0
- package/tests/test-app/src/pages/DataStatistics.tsx +317 -0
- package/tests/test-app/src/pages/DepartmentManagement.tsx +503 -0
- package/tests/test-app/src/pages/FileExplorer.tsx +441 -0
- package/tests/test-app/src/pages/OrderDetail.tsx +393 -0
- package/tests/test-app/src/pages/ProductManagement.tsx +521 -0
- package/tests/test-app/src/pages/ProjectTimeline.tsx +395 -0
- package/tests/test-app/src/pages/RoleManagement.tsx +523 -0
- package/tests/test-app/src/pages/SLAManagement.tsx +668 -0
- package/tests/test-app/src/pages/StaticCyberpunkDashboard.tsx +462 -0
- package/tests/test-app/src/pages/StaticCyberpunkUserList.tsx +567 -0
- package/tests/test-app/src/pages/StudentWeaknessList.tsx +547 -0
- package/tests/test-app/src/pages/SystemSettings.tsx +422 -0
- package/tests/test-app/src/pages/TaskManagement.tsx +467 -0
- package/tests/test-app/src/pages/TicketCreate.tsx +27 -0
- package/tests/test-app/src/pages/TicketDetail.tsx +27 -0
- package/tests/test-app/src/pages/TicketList.tsx +27 -0
- package/tests/test-app/src/pages/TicketManagement.tsx +402 -0
- package/tests/test-app/src/pages/TicketManagementPage.tsx +1238 -0
- package/tests/test-app/src/pages/UserProfile.tsx +404 -0
- package/tests/test-app/src/pages/VisualAIIDEUpgrade.tsx +245 -0
- package/tests/test-app/src/pages/WorkflowDesigner.tsx +434 -0
- package/tests/test-app/src/pages/admin/dashboard.tsx +591 -0
- package/tests/test-app/src/pages/appthen_guide/ComponentTreeUnderstanding.tsx +26 -0
- package/tests/test-app/src/pages/appthen_guide/DataBindingLearning.tsx +26 -0
- package/tests/test-app/src/pages/article-list.tsx +222 -0
- package/tests/test-app/src/pages/babyProductRecommendationPage.tsx +168 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout.tsx +155 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout10.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout2.tsx +156 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout3.tsx +156 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout4.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout5.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout6.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout7.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout8.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout9.tsx +157 -0
- package/tests/test-app/src/pages/back-end/backgroundManagementSystem.css +5 -0
- package/tests/test-app/src/pages/back-end/backgroundManagementSystem.tsx +1745 -0
- package/tests/test-app/src/pages/category-list.tsx +179 -0
- package/tests/test-app/src/pages/comment-list.tsx +194 -0
- package/tests/test-app/src/pages/component/WorkOrderCard.tsx +140 -0
- package/tests/test-app/src/pages/cover.tsx +42 -0
- package/tests/test-app/src/pages/cyberpunk/cyberpunkCRMPage.tsx +1299 -0
- package/tests/test-app/src/pages/data-analytics.tsx +1872 -0
- package/tests/test-app/src/pages/data-overview.tsx +600 -0
- package/tests/test-app/src/pages/data_dashboard/blueBrightGreenTechnologyWind.css +181 -0
- package/tests/test-app/src/pages/data_dashboard/blueBrightGreenTechnologyWind.tsx +225 -0
- package/tests/test-app/src/pages/data_dashboard/blueLargeScreen.css +181 -0
- package/tests/test-app/src/pages/data_dashboard/blueLargeScreen.tsx +138 -0
- package/tests/test-app/src/pages/data_dashboard/component_library/BlueBrightGreenBorder.tsx +47 -0
- package/tests/test-app/src/pages/data_dashboard/component_library/FullScreenContainer.tsx +133 -0
- package/tests/test-app/src/pages/demo-error-page.tsx +119 -0
- package/tests/test-app/src/pages/department-list.tsx +183 -0
- package/tests/test-app/src/pages/description_of_mock_interface.md +32 -0
- package/tests/test-app/src/pages/digitalLargeScreen.css +181 -0
- package/tests/test-app/src/pages/digitalLargeScreen.tsx +1417 -0
- package/tests/test-app/src/pages/goods-list.tsx +233 -0
- package/tests/test-app/src/pages/housekeeping/adminDashboardPage.tsx +880 -0
- package/tests/test-app/src/pages/mobile_terminal/PersonalCenter.css +3 -0
- package/tests/test-app/src/pages/mobile_terminal/PersonalCenter.tsx +362 -0
- package/tests/test-app/src/pages/mobile_terminal/WorkOrderHomepage.tsx +337 -0
- package/tests/test-app/src/pages/mobile_terminal/newWorkOrder.tsx +224 -0
- package/tests/test-app/src/pages/mobile_terminal/tabbar.tsx +67 -0
- package/tests/test-app/src/pages/mobile_terminal/uiHandsOnPractice.tsx +638 -0
- package/tests/test-app/src/pages/mobile_terminal/workOrderDetails.tsx +346 -0
- package/tests/test-app/src/pages/mobile_terminal/workOrderPage.tsx +345 -0
- package/tests/test-app/src/pages/notice-list.tsx +217 -0
- package/tests/test-app/src/pages/order-detail.tsx +330 -0
- package/tests/test-app/src/pages/order-list.tsx +195 -0
- package/tests/test-app/src/pages/order-management.tsx +563 -0
- package/tests/test-app/src/pages/page/OrderList.tsx +230 -0
- package/tests/test-app/src/pages/role-list.tsx +184 -0
- package/tests/test-app/src/pages/simple/simplePage.tsx +92 -0
- package/tests/test-app/src/pages/simple-page.tsx +43 -0
- package/tests/test-app/src/pages/test-destructure.tsx +44 -0
- package/tests/test-app/src/pages/test-error-page.tsx +75 -0
- package/tests/test-app/src/pages/test-page-with-errors.tsx +51 -0
- package/tests/test-app/src/pages/test-page.tsx +101 -0
- package/tests/test-app/src/pages/test-render.tsx +52 -0
- package/tests/test-app/src/pages/test-return-type.tsx +41 -0
- package/tests/test-app/src/pages/test-type-assertion.tsx +37 -0
- package/tests/test-app/src/pages/testPage.css +3 -0
- package/tests/test-app/src/pages/testPage.tsx +158 -0
- package/tests/test-app/src/pages/ui/styleSelectorPage.tsx +1554 -0
- package/tests/test-app/src/pages/user-list.tsx +212 -0
- package/tests/test-app/src/pages/web_version/website.css +205 -0
- package/tests/test-app/src/pages/web_version/website.tsx +1066 -0
- package/tests/test-app/src/pages/wrong-page.tsx +50 -0
- package/tests/test-app/src/pages//345/276/205/345/212/236.apidoc.json +336 -0
- package/tests/test-app/src/project.json +1120 -0
- package/tests/test-app/src/store/global.store.ts +10 -0
- package/tests/test-app/src/types/CreateTicketParams.m.ts +20 -0
- package/tests/test-app/src/types/SLAPolicy.ts +50 -0
- package/tests/test-app/src/types/Ticket.ts +68 -0
- package/tests/test-app/src/types/TicketAttachment.m.ts +67 -0
- package/tests/test-app/src/types/TicketComment.m.ts +59 -0
- package/tests/test-app/src/types/TicketEvaluation.ts +44 -0
- package/tests/test-app/src/types/TicketHistory.m.ts +71 -0
- package/tests/test-app/src/types/TicketListParams.m.ts +30 -0
- package/tests/test-app/src/types/TicketPriority.m.ts +65 -0
- package/tests/test-app/src/types/TicketRecord.ts +47 -0
- package/tests/test-app/src/types/TrainDoor.ts +284 -0
- package/tests/test-app/src/types/UpdateTicketParams.m.ts +22 -0
- package/tests/test-app/src/utils/__afterRequest.util.ts +3 -0
- package/tests/test-app/src/utils/__beforeRequest.util.ts +10 -0
- package/tests/test-app/src/utils/testGlobalAction.util.ts +7 -0
|
@@ -0,0 +1,563 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 订单管理中心
|
|
3
|
+
* 统一管理所有订单,支持筛选、搜索、导出
|
|
4
|
+
*
|
|
5
|
+
* @type Page
|
|
6
|
+
* @route /orders
|
|
7
|
+
* @screen 1920w
|
|
8
|
+
* @frames web
|
|
9
|
+
*/
|
|
10
|
+
import React from 'react';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class IProps {
|
|
15
|
+
defaultStatus?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/*
|
|
19
|
+
* 数据与接口请求定义
|
|
20
|
+
*/
|
|
21
|
+
class IState {
|
|
22
|
+
/* 订单列表数据 */
|
|
23
|
+
orders?: {
|
|
24
|
+
/* @example ORD-2024-1218-001 */id?: string,
|
|
25
|
+
/* @example 张三 */customer?: string,
|
|
26
|
+
/* @example 138****1234 */phone?: string,
|
|
27
|
+
/* @example 12999 */amount?: number,
|
|
28
|
+
/* @example completed */status?: string,
|
|
29
|
+
/* @example alipay */payment?: string,
|
|
30
|
+
/* @example 2024-12-18 10:30:25 */createTime?: string,
|
|
31
|
+
/* @example 2024-12-18 11:15:30 */updateTime?: string,
|
|
32
|
+
/* @example 广东省深圳市南山区科技园 */address?: string,
|
|
33
|
+
}[];
|
|
34
|
+
/* 加载状态 */
|
|
35
|
+
loading?: boolean;
|
|
36
|
+
/* 选中的状态筛选 */
|
|
37
|
+
statusFilter?: string;
|
|
38
|
+
/* 搜索关键词 */
|
|
39
|
+
searchKeyword?: string;
|
|
40
|
+
/* 选中的订单ID列表 */
|
|
41
|
+
selectedRowKeys?: string[];
|
|
42
|
+
/* 统计数据 */
|
|
43
|
+
statistics?: {
|
|
44
|
+
/* @example 2856 */total?: number,
|
|
45
|
+
/* @example 128 */today?: number,
|
|
46
|
+
/* @example 45 */pending?: number,
|
|
47
|
+
/* @example 32 */processing?: number,
|
|
48
|
+
/* @example 86 */shipped?: number,
|
|
49
|
+
/* @example 2385 */completed?: number,
|
|
50
|
+
/* @example 256 */refunded?: number,
|
|
51
|
+
/* @example 52 */cancelled?: number,
|
|
52
|
+
/* @example 8526320 */totalAmount?: number,
|
|
53
|
+
/* @example 86250 */todayAmount?: number,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
class Document extends React.Component<IProps, IState> {
|
|
58
|
+
state = {
|
|
59
|
+
orders: [
|
|
60
|
+
{
|
|
61
|
+
id: 'ORD-2024-1218-001',
|
|
62
|
+
customer: '张三',
|
|
63
|
+
phone: '138****1234',
|
|
64
|
+
amount: 12999,
|
|
65
|
+
status: 'completed',
|
|
66
|
+
payment: 'alipay',
|
|
67
|
+
createTime: '2024-12-18 10:30:25',
|
|
68
|
+
updateTime: '2024-12-18 11:15:30',
|
|
69
|
+
address: '广东省深圳市南山区科技园',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: 'ORD-2024-1218-002',
|
|
73
|
+
customer: '李四',
|
|
74
|
+
phone: '139****5678',
|
|
75
|
+
amount: 5999,
|
|
76
|
+
status: 'pending',
|
|
77
|
+
payment: 'wechat',
|
|
78
|
+
createTime: '2024-12-18 10:15:18',
|
|
79
|
+
updateTime: '2024-12-18 10:15:18',
|
|
80
|
+
address: '浙江省杭州市西湖区文三路',
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: 'ORD-2024-1218-003',
|
|
84
|
+
customer: '王五',
|
|
85
|
+
phone: '137****9012',
|
|
86
|
+
amount: 8999,
|
|
87
|
+
status: 'shipped',
|
|
88
|
+
payment: 'alipay',
|
|
89
|
+
createTime: '2024-12-18 09:50:33',
|
|
90
|
+
updateTime: '2024-12-18 14:20:15',
|
|
91
|
+
address: '江苏省南京市鼓楼区新街口',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: 'ORD-2024-1218-004',
|
|
95
|
+
customer: '赵六',
|
|
96
|
+
phone: '136****3456',
|
|
97
|
+
amount: 25999,
|
|
98
|
+
status: 'processing',
|
|
99
|
+
payment: 'wechat',
|
|
100
|
+
createTime: '2024-12-18 09:30:12',
|
|
101
|
+
updateTime: '2024-12-18 10:45:20',
|
|
102
|
+
address: '北京市朝阳区建国路',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: 'ORD-2024-1218-005',
|
|
106
|
+
customer: '钱七',
|
|
107
|
+
phone: '135****7890',
|
|
108
|
+
amount: 799,
|
|
109
|
+
status: 'cancelled',
|
|
110
|
+
payment: 'alipay',
|
|
111
|
+
createTime: '2024-12-18 08:45:28',
|
|
112
|
+
updateTime: '2024-12-18 09:20:15',
|
|
113
|
+
address: '上海市浦东新区陆家嘴',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: 'ORD-2024-1218-006',
|
|
117
|
+
customer: '孙八',
|
|
118
|
+
phone: '134****2345',
|
|
119
|
+
amount: 1599,
|
|
120
|
+
status: 'completed',
|
|
121
|
+
payment: 'wechat',
|
|
122
|
+
createTime: '2024-12-18 08:20:45',
|
|
123
|
+
updateTime: '2024-12-18 12:30:00',
|
|
124
|
+
address: '四川省成都市高新区天府大道',
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
id: 'ORD-2024-1218-007',
|
|
128
|
+
customer: '周九',
|
|
129
|
+
phone: '133****6789',
|
|
130
|
+
amount: 3299,
|
|
131
|
+
status: 'refunded',
|
|
132
|
+
payment: 'alipay',
|
|
133
|
+
createTime: '2024-12-18 07:55:18',
|
|
134
|
+
updateTime: '2024-12-18 15:10:25',
|
|
135
|
+
address: '湖北省武汉市武昌区中南路',
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
id: 'ORD-2024-1218-008',
|
|
139
|
+
customer: '吴十',
|
|
140
|
+
phone: '132****0123',
|
|
141
|
+
amount: 899,
|
|
142
|
+
status: 'completed',
|
|
143
|
+
payment: 'wechat',
|
|
144
|
+
createTime: '2024-12-18 07:30:50',
|
|
145
|
+
updateTime: '2024-12-18 10:00:00',
|
|
146
|
+
address: '福建省厦门市思明区环岛路',
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
loading: false,
|
|
150
|
+
statusFilter: 'all',
|
|
151
|
+
searchKeyword: '',
|
|
152
|
+
selectedRowKeys: [],
|
|
153
|
+
statistics: {
|
|
154
|
+
total: 2856,
|
|
155
|
+
today: 128,
|
|
156
|
+
pending: 45,
|
|
157
|
+
processing: 32,
|
|
158
|
+
shipped: 86,
|
|
159
|
+
completed: 2385,
|
|
160
|
+
refunded: 256,
|
|
161
|
+
cancelled: 52,
|
|
162
|
+
totalAmount: 8526320,
|
|
163
|
+
todayAmount: 86250,
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
handleSearch(value) {
|
|
168
|
+
this.setState({
|
|
169
|
+
searchKeyword: value,
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
handleStatusChange(value) {
|
|
174
|
+
this.setState({
|
|
175
|
+
statusFilter: value,
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
handleExport() {
|
|
180
|
+
console.log('导出订单');
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
handleRefresh() {
|
|
184
|
+
this.setState({
|
|
185
|
+
loading: true,
|
|
186
|
+
});
|
|
187
|
+
setTimeout(() => {
|
|
188
|
+
this.setState({
|
|
189
|
+
loading: false,
|
|
190
|
+
});
|
|
191
|
+
}, 1000);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
getStatusConfig(status) {
|
|
195
|
+
const config = {
|
|
196
|
+
pending: {
|
|
197
|
+
text: '待付款',
|
|
198
|
+
color: 'orange',
|
|
199
|
+
bg: 'bg-orange-100 text-orange-700',
|
|
200
|
+
},
|
|
201
|
+
processing: {
|
|
202
|
+
text: '处理中',
|
|
203
|
+
color: 'blue',
|
|
204
|
+
bg: 'bg-blue-100 text-blue-700',
|
|
205
|
+
},
|
|
206
|
+
shipped: {
|
|
207
|
+
text: '已发货',
|
|
208
|
+
color: 'cyan',
|
|
209
|
+
bg: 'bg-cyan-100 text-cyan-700',
|
|
210
|
+
},
|
|
211
|
+
completed: {
|
|
212
|
+
text: '已完成',
|
|
213
|
+
color: 'green',
|
|
214
|
+
bg: 'bg-green-100 text-green-700',
|
|
215
|
+
},
|
|
216
|
+
refunded: {
|
|
217
|
+
text: '已退款',
|
|
218
|
+
color: 'purple',
|
|
219
|
+
bg: 'bg-purple-100 text-purple-700',
|
|
220
|
+
},
|
|
221
|
+
cancelled: {
|
|
222
|
+
text: '已取消',
|
|
223
|
+
color: 'red',
|
|
224
|
+
bg: 'bg-red-100 text-red-700',
|
|
225
|
+
},
|
|
226
|
+
};
|
|
227
|
+
return config[status] || config.pending;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
getPaymentIcon(payment) {
|
|
231
|
+
const icons = {
|
|
232
|
+
alipay: '🔵',
|
|
233
|
+
wechat: '🟢',
|
|
234
|
+
creditcard: '💳',
|
|
235
|
+
balance: '💰',
|
|
236
|
+
};
|
|
237
|
+
return icons[payment] || '💳';
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
render() {
|
|
241
|
+
return (
|
|
242
|
+
<Page className="bg-gradient-to-br from-[#f8fafc] via-blue-50 to-[var(--cyan-50)] min-h-screen">
|
|
243
|
+
<View className="bg-white/80 backdrop-blur-sm border-gray-200 border-b-[1px] border-b-solid pl-[24px] pr-[24px] pt-[16px] pb-[16px] sticky top-[0px] z-10">
|
|
244
|
+
<View className="flex items-center justify-between ml-[auto] mr-[auto]">
|
|
245
|
+
<View>
|
|
246
|
+
<h1 className="bg-gradient-to-r from-blue-600 to-[var(--cyan-600)] [WebkitBackgroundClip:text] [WebkitTextFillColor:transparent] [backgroundClip:text] [backgroundClip:text] [WebkitBackgroundClip:text] text-[transparent] text-2xl font-bold">
|
|
247
|
+
📦 订单管理中心
|
|
248
|
+
</h1>
|
|
249
|
+
<p className="text-[#6b7280] text-sm mt-[4px]">
|
|
250
|
+
统一管理所有订单,实时追踪订单状态
|
|
251
|
+
</p>
|
|
252
|
+
</View>
|
|
253
|
+
<Space>
|
|
254
|
+
<Button
|
|
255
|
+
onClick={() => this.handleRefresh()}
|
|
256
|
+
loading={this.state.loading}
|
|
257
|
+
>
|
|
258
|
+
🔄 刷新
|
|
259
|
+
</Button>
|
|
260
|
+
<Button type="primary" onClick={() => this.handleExport()}>
|
|
261
|
+
📥 导出数据
|
|
262
|
+
</Button>
|
|
263
|
+
</Space>
|
|
264
|
+
</View>
|
|
265
|
+
</View>
|
|
266
|
+
<View className="p-[24px] ml-[auto] mr-[auto]">
|
|
267
|
+
<Row gutter={[16, 16]} className="mb-[24px]">
|
|
268
|
+
<Col xs={12} sm={8} md={6} lg={4}>
|
|
269
|
+
<Card className="hover:shadow-lg hover:-translate-y-1 transition-all duration-300 border-blue-500 border-l-[16px] border-l-solid">
|
|
270
|
+
<View className="text-[#6b7280] text-sm mb-[4px]">总订单</View>
|
|
271
|
+
<View className="text-2xl font-bold text-[var(--blue-600)]">
|
|
272
|
+
<Text>{this.state.statistics?.total?.toLocaleString()}</Text>
|
|
273
|
+
</View>
|
|
274
|
+
<View className="text-xs text-[#9ca3af] mt-[4px]">
|
|
275
|
+
累计订单数
|
|
276
|
+
</View>
|
|
277
|
+
</Card>
|
|
278
|
+
</Col>
|
|
279
|
+
<Col xs={12} sm={8} md={6} lg={4}>
|
|
280
|
+
<Card className="hover:shadow-lg hover:-translate-y-1 transition-all duration-300 border-green-500 border-l-[16px] border-l-solid">
|
|
281
|
+
<View className="text-[#6b7280] text-sm mb-[4px]">
|
|
282
|
+
今日订单
|
|
283
|
+
</View>
|
|
284
|
+
<View className="text-2xl font-bold text-[var(--green-600)]">
|
|
285
|
+
<Text>{this.state.statistics?.today?.toLocaleString()}</Text>
|
|
286
|
+
</View>
|
|
287
|
+
<View className="text-xs text-[#9ca3af] mt-[4px]">
|
|
288
|
+
今日新增
|
|
289
|
+
</View>
|
|
290
|
+
</Card>
|
|
291
|
+
</Col>
|
|
292
|
+
<Col xs={12} sm={8} md={6} lg={4}>
|
|
293
|
+
<Card className="hover:shadow-lg hover:-translate-y-1 transition-all duration-300 border-orange-500 border-l-[16px] border-l-solid">
|
|
294
|
+
<View className="text-[#6b7280] text-sm mb-[4px]">待处理</View>
|
|
295
|
+
<View className="text-2xl font-bold text-[var(--orange-600)]">
|
|
296
|
+
<Text>
|
|
297
|
+
{this.state.statistics?.pending?.toLocaleString()}
|
|
298
|
+
</Text>
|
|
299
|
+
</View>
|
|
300
|
+
<View className="text-xs text-[#9ca3af] mt-[4px]">
|
|
301
|
+
待付款订单
|
|
302
|
+
</View>
|
|
303
|
+
</Card>
|
|
304
|
+
</Col>
|
|
305
|
+
<Col xs={12} sm={8} md={6} lg={4}>
|
|
306
|
+
<Card className="hover:shadow-lg hover:-translate-y-1 transition-all duration-300 border-blue-500 border-l-[16px] border-l-solid">
|
|
307
|
+
<View className="text-[#6b7280] text-sm mb-[4px]">处理中</View>
|
|
308
|
+
<View className="text-2xl font-bold text-[var(--blue-600)]">
|
|
309
|
+
<Text>
|
|
310
|
+
{this.state.statistics?.processing?.toLocaleString()}
|
|
311
|
+
</Text>
|
|
312
|
+
</View>
|
|
313
|
+
<View className="text-xs text-[#9ca3af] mt-[4px]">
|
|
314
|
+
正在处理
|
|
315
|
+
</View>
|
|
316
|
+
</Card>
|
|
317
|
+
</Col>
|
|
318
|
+
<Col xs={12} sm={8} md={6} lg={4}>
|
|
319
|
+
<Card className="hover:shadow-lg hover:-translate-y-1 transition-all duration-300 border-cyan-500 border-l-[16px] border-l-solid">
|
|
320
|
+
<View className="text-[#6b7280] text-sm mb-[4px]">已发货</View>
|
|
321
|
+
<View className="text-2xl font-bold text-[var(--cyan-600)]">
|
|
322
|
+
<Text>
|
|
323
|
+
{this.state.statistics?.shipped?.toLocaleString()}
|
|
324
|
+
</Text>
|
|
325
|
+
</View>
|
|
326
|
+
<View className="text-xs text-[#9ca3af] mt-[4px]">运输中</View>
|
|
327
|
+
</Card>
|
|
328
|
+
</Col>
|
|
329
|
+
<Col xs={12} sm={8} md={6} lg={4}>
|
|
330
|
+
<Card className="hover:shadow-lg hover:-translate-y-1 transition-all duration-300 border-green-500 border-l-[16px] border-l-solid">
|
|
331
|
+
<View className="text-[#6b7280] text-sm mb-[4px]">已完成</View>
|
|
332
|
+
<View className="text-2xl font-bold text-[var(--green-600)]">
|
|
333
|
+
<Text>
|
|
334
|
+
{this.state.statistics?.completed?.toLocaleString()}
|
|
335
|
+
</Text>
|
|
336
|
+
</View>
|
|
337
|
+
<View className="text-xs text-[#9ca3af] mt-[4px]">
|
|
338
|
+
交易完成
|
|
339
|
+
</View>
|
|
340
|
+
</Card>
|
|
341
|
+
</Col>
|
|
342
|
+
</Row>
|
|
343
|
+
<Row gutter={[16, 16]} className="mb-[24px]">
|
|
344
|
+
<Col xs={24} md={12}>
|
|
345
|
+
<Card className="hover:shadow-xl transition-all duration-300 bg-gradient-to-r from-blue-500 to-blue-600 text-[#ffffff]">
|
|
346
|
+
<View className="flex items-center justify-between">
|
|
347
|
+
<View>
|
|
348
|
+
<View className="text-[var(--blue-100)] text-sm mb-[4px]">
|
|
349
|
+
总成交金额
|
|
350
|
+
</View>
|
|
351
|
+
<View className="text-3xl font-bold">
|
|
352
|
+
¥
|
|
353
|
+
<Text>
|
|
354
|
+
{this.state.statistics?.totalAmount?.toLocaleString()}
|
|
355
|
+
</Text>
|
|
356
|
+
</View>
|
|
357
|
+
<View className="text-[var(--blue-200)] text-sm mt-[4px]">
|
|
358
|
+
历史累计
|
|
359
|
+
</View>
|
|
360
|
+
</View>
|
|
361
|
+
<View className="text-6xl [opacity:0.2]">💰</View>
|
|
362
|
+
</View>
|
|
363
|
+
</Card>
|
|
364
|
+
</Col>
|
|
365
|
+
<Col xs={24} md={12}>
|
|
366
|
+
<Card className="hover:shadow-xl transition-all duration-300 bg-gradient-to-r from-[var(--cyan-500)] to-[var(--teal-500)] text-[#ffffff]">
|
|
367
|
+
<View className="flex items-center justify-between">
|
|
368
|
+
<View>
|
|
369
|
+
<View className="text-[var(--cyan-100)] text-sm mb-[4px]">
|
|
370
|
+
今日成交
|
|
371
|
+
</View>
|
|
372
|
+
<View className="text-3xl font-bold">
|
|
373
|
+
¥
|
|
374
|
+
<Text>
|
|
375
|
+
{this.state.statistics?.todayAmount?.toLocaleString()}
|
|
376
|
+
</Text>
|
|
377
|
+
</View>
|
|
378
|
+
<View className="text-[var(--cyan-200)] text-sm mt-[4px]">
|
|
379
|
+
今日实时
|
|
380
|
+
</View>
|
|
381
|
+
</View>
|
|
382
|
+
<View className="text-6xl [opacity:0.2]">📈</View>
|
|
383
|
+
</View>
|
|
384
|
+
</Card>
|
|
385
|
+
</Col>
|
|
386
|
+
</Row>
|
|
387
|
+
<Card className="mb-[24px]">
|
|
388
|
+
<Row gutter={[16, 16]} align="middle">
|
|
389
|
+
<Col xs={24} sm={12} md={6}>
|
|
390
|
+
<View>
|
|
391
|
+
<View className="text-[#6b7280] text-sm mb-[8px]">
|
|
392
|
+
订单状态
|
|
393
|
+
</View>
|
|
394
|
+
<Select
|
|
395
|
+
value={this.state.statusFilter}
|
|
396
|
+
onChange={value => this.handleStatusChange(value)}
|
|
397
|
+
className="w-full"
|
|
398
|
+
>
|
|
399
|
+
<Select.Option value="all">全部状态</Select.Option>
|
|
400
|
+
<Select.Option value="pending">待付款</Select.Option>
|
|
401
|
+
<Select.Option value="processing">处理中</Select.Option>
|
|
402
|
+
<Select.Option value="shipped">已发货</Select.Option>
|
|
403
|
+
<Select.Option value="completed">已完成</Select.Option>
|
|
404
|
+
<Select.Option value="refunded">已退款</Select.Option>
|
|
405
|
+
<Select.Option value="cancelled">已取消</Select.Option>
|
|
406
|
+
</Select>
|
|
407
|
+
</View>
|
|
408
|
+
</Col>
|
|
409
|
+
<Col xs={24} sm={12} md={6}>
|
|
410
|
+
<View>
|
|
411
|
+
<View className="text-[#6b7280] text-sm mb-[8px]">
|
|
412
|
+
搜索订单
|
|
413
|
+
</View>
|
|
414
|
+
<Input
|
|
415
|
+
placeholder="订单号/客户姓名/手机号"
|
|
416
|
+
value={this.state.searchKeyword}
|
|
417
|
+
onChange={e => this.handleSearch(e.target.value)}
|
|
418
|
+
prefix="🔍"
|
|
419
|
+
/>
|
|
420
|
+
</View>
|
|
421
|
+
</Col>
|
|
422
|
+
<Col xs={24} sm={12} md={6}>
|
|
423
|
+
<View>
|
|
424
|
+
<View className="text-[#6b7280] text-sm mb-[8px]">
|
|
425
|
+
创建时间
|
|
426
|
+
</View>
|
|
427
|
+
<Input type="date" className="w-full" />
|
|
428
|
+
</View>
|
|
429
|
+
</Col>
|
|
430
|
+
<Col xs={24} sm={12} md={6} className="text-[var(--right)]">
|
|
431
|
+
<View>
|
|
432
|
+
<View className="text-[#6b7280] text-sm mb-[8px]">操作</View>
|
|
433
|
+
<Button block={true} type="primary">
|
|
434
|
+
🔍 查询订单
|
|
435
|
+
</Button>
|
|
436
|
+
</View>
|
|
437
|
+
</Col>
|
|
438
|
+
</Row>
|
|
439
|
+
</Card>
|
|
440
|
+
<Card>
|
|
441
|
+
<Table
|
|
442
|
+
loading={this.state.loading}
|
|
443
|
+
columns={[
|
|
444
|
+
{
|
|
445
|
+
title: '订单信息',
|
|
446
|
+
key: 'order',
|
|
447
|
+
render: (text, record) => (
|
|
448
|
+
<View>
|
|
449
|
+
<View className="font-semibold text-[#1f2937]">
|
|
450
|
+
<Text>{record.id}</Text>
|
|
451
|
+
</View>
|
|
452
|
+
<View className="text-xs text-[#6b7280] mt-[4px]">
|
|
453
|
+
<Text>{record.createTime}</Text>
|
|
454
|
+
</View>
|
|
455
|
+
</View>
|
|
456
|
+
),
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
title: '客户信息',
|
|
460
|
+
key: 'customer',
|
|
461
|
+
render: (text, record) => (
|
|
462
|
+
<View>
|
|
463
|
+
<View className="font-medium text-[#1f2937]">
|
|
464
|
+
<Text>{record.customer}</Text>
|
|
465
|
+
</View>
|
|
466
|
+
<View className="text-xs text-[#6b7280]">
|
|
467
|
+
<Text>{record.phone}</Text>
|
|
468
|
+
</View>
|
|
469
|
+
<View className="text-xs text-[#9ca3af] overflow-hidden [textOverflow:ellipsis] [whiteSpace:nowrap] max-w-[128px]">
|
|
470
|
+
<Text>{record.address}</Text>
|
|
471
|
+
</View>
|
|
472
|
+
</View>
|
|
473
|
+
),
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
title: '订单金额',
|
|
477
|
+
key: 'amount',
|
|
478
|
+
render: (text, record) => (
|
|
479
|
+
<View>
|
|
480
|
+
<View className="font-bold text-lg text-[var(--blue-600)]">
|
|
481
|
+
¥<Text>{record.amount?.toLocaleString()}</Text>
|
|
482
|
+
</View>
|
|
483
|
+
<View className="text-xs text-[#6b7280] flex items-center">
|
|
484
|
+
<Text className="mr-[4px]">
|
|
485
|
+
{this.getPaymentIcon(record.payment)}
|
|
486
|
+
</Text>
|
|
487
|
+
{record.payment === 'alipay'
|
|
488
|
+
? '支付宝'
|
|
489
|
+
: record.payment === 'wechat'
|
|
490
|
+
? '微信支付'
|
|
491
|
+
: '其他'}
|
|
492
|
+
</View>
|
|
493
|
+
</View>
|
|
494
|
+
),
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
title: '订单状态',
|
|
498
|
+
key: 'status',
|
|
499
|
+
render: (text, record) =>
|
|
500
|
+
(() => {
|
|
501
|
+
const config = this.getStatusConfig(record.status);
|
|
502
|
+
return (
|
|
503
|
+
<View>
|
|
504
|
+
<Tag color={config.color} className="font-medium">
|
|
505
|
+
<Text>{config.text}</Text>
|
|
506
|
+
</Tag>
|
|
507
|
+
<View className="text-xs text-[#6b7280] mt-[4px]">
|
|
508
|
+
<Text>{record.updateTime}</Text>
|
|
509
|
+
</View>
|
|
510
|
+
</View>
|
|
511
|
+
);
|
|
512
|
+
})(),
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
title: '操作',
|
|
516
|
+
key: 'action',
|
|
517
|
+
render: (text, record) => (
|
|
518
|
+
<Space size="small">
|
|
519
|
+
<Button
|
|
520
|
+
size="small"
|
|
521
|
+
type="link"
|
|
522
|
+
className="text-[var(--blue-600)]"
|
|
523
|
+
>
|
|
524
|
+
查看详情
|
|
525
|
+
</Button>
|
|
526
|
+
<Button
|
|
527
|
+
size="small"
|
|
528
|
+
type="link"
|
|
529
|
+
className="text-[#4b5563]"
|
|
530
|
+
>
|
|
531
|
+
编辑
|
|
532
|
+
</Button>
|
|
533
|
+
<Button
|
|
534
|
+
size="small"
|
|
535
|
+
type="link"
|
|
536
|
+
className="text-[var(--orange-600)]"
|
|
537
|
+
>
|
|
538
|
+
备注
|
|
539
|
+
</Button>
|
|
540
|
+
</Space>
|
|
541
|
+
),
|
|
542
|
+
},
|
|
543
|
+
]}
|
|
544
|
+
dataSource={this.state.orders}
|
|
545
|
+
rowKey="id"
|
|
546
|
+
pagination={{
|
|
547
|
+
total: this.state.statistics?.total,
|
|
548
|
+
pageSize: 10,
|
|
549
|
+
showSizeChanger: true,
|
|
550
|
+
showQuickJumper: true,
|
|
551
|
+
showTotal: function (total) {
|
|
552
|
+
return `共 ${total} 条记录`;
|
|
553
|
+
},
|
|
554
|
+
}}
|
|
555
|
+
/>
|
|
556
|
+
</Card>
|
|
557
|
+
</View>
|
|
558
|
+
</Page>
|
|
559
|
+
);
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
export default Document;
|