mall-components 1.0.0
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/README.md +128 -0
- package/build/_components-raw.css +791 -0
- package/build/_shims/antd.js +1 -0
- package/build/_shims/icons.js +1 -0
- package/build/_shims/moment.js +1 -0
- package/build/_shims/react-dom.js +1 -0
- package/build/_shims/react.js +1 -0
- package/build/adapters/DataSourceAdapter.d.ts +46 -0
- package/build/components/AdminLayout/AdminLayout.d.ts +5 -0
- package/build/components/AdminLayout/Breadcrumb.d.ts +8 -0
- package/build/components/AdminLayout/MainContent.d.ts +17 -0
- package/build/components/AdminLayout/Navbar.d.ts +10 -0
- package/build/components/AdminLayout/Sidebar.d.ts +14 -0
- package/build/components/AdminLayout/TabBar.d.ts +13 -0
- package/build/components/AdminLayout/TabPane.d.ts +4 -0
- package/build/components/AdminLayout/index.d.ts +3 -0
- package/build/components/AdminLayout/types.d.ts +42 -0
- package/build/components/CouponCard/CouponCard.d.ts +20 -0
- package/build/components/CouponCard/index.d.ts +1 -0
- package/build/components/OrderForm/OrderForm.d.ts +18 -0
- package/build/components/OrderForm/index.d.ts +1 -0
- package/build/components/OrderList/OrderList.d.ts +29 -0
- package/build/components/OrderList/index.d.ts +1 -0
- package/build/components/ProductForm/ProductForm.d.ts +18 -0
- package/build/components/ProductForm/index.d.ts +3 -0
- package/build/components/ProductList/ProductList.d.ts +47 -0
- package/build/components/ProductList/index.d.ts +3 -0
- package/build/components/PromotionCard/PromotionCard.d.ts +22 -0
- package/build/components/PromotionCard/index.d.ts +1 -0
- package/build/components/RoleCard/RoleCard.d.ts +18 -0
- package/build/components/RoleCard/index.d.ts +1 -0
- package/build/components/UserCard/UserCard.d.ts +17 -0
- package/build/components/UserCard/index.d.ts +1 -0
- package/build/entry-meta.d.ts +603 -0
- package/build/index.css +1 -0
- package/build/index.js +1 -0
- package/build/mall-components-meta.js +2563 -0
- package/build/mall-components.cdn.umd.css +1 -0
- package/build/mall-components.cdn.umd.js +8 -0
- package/build/mall-components.codesandbox.combined.js +1094 -0
- package/build/mall-components.codesandbox.css +401 -0
- package/build/mall-components.codesandbox.js +1080 -0
- package/build/mall-components.umd.css +1 -0
- package/build/mall-components.umd.js +8 -0
- package/build/meta/adminLayoutMeta.d.ts +3 -0
- package/build/meta/couponCardMeta.d.ts +128 -0
- package/build/meta/icons.d.ts +10 -0
- package/build/meta/orderFormMeta.d.ts +111 -0
- package/build/meta/orderListMeta.d.ts +170 -0
- package/build/meta/productFormMeta.d.ts +3 -0
- package/build/meta/productListMeta.d.ts +200 -0
- package/build/meta/promotionCardMeta.d.ts +129 -0
- package/build/meta/roleCardMeta.d.ts +3 -0
- package/build/meta/tabPaneMeta.d.ts +3 -0
- package/build/meta/userCardMeta.d.ts +3 -0
- package/build/meta.d.ts +605 -0
- package/build/setters/RestApiTester.d.ts +11 -0
- package/build/types/common.d.ts +17 -0
- package/build/types/marketing.d.ts +128 -0
- package/build/types/order.d.ts +174 -0
- package/build/types/permission.d.ts +101 -0
- package/build/types/product.d.ts +47 -0
- package/package.json +1 -0
- package/src/adapters/DataSourceAdapter.ts +445 -0
- package/src/components/AdminLayout/AdminLayout.scss +447 -0
- package/src/components/AdminLayout/AdminLayout.tsx +681 -0
- package/src/components/AdminLayout/Breadcrumb.tsx +60 -0
- package/src/components/AdminLayout/MainContent.tsx +54 -0
- package/src/components/AdminLayout/Navbar.tsx +76 -0
- package/src/components/AdminLayout/Sidebar.tsx +256 -0
- package/src/components/AdminLayout/TabBar.tsx +177 -0
- package/src/components/AdminLayout/TabPane.tsx +29 -0
- package/src/components/AdminLayout/index.ts +3 -0
- package/src/components/AdminLayout/types.ts +46 -0
- package/src/components/CouponCard/CouponCard.scss +55 -0
- package/src/components/CouponCard/CouponCard.tsx +687 -0
- package/src/components/CouponCard/index.ts +1 -0
- package/src/components/OrderForm/OrderForm.scss +148 -0
- package/src/components/OrderForm/OrderForm.tsx +503 -0
- package/src/components/OrderForm/index.ts +1 -0
- package/src/components/OrderList/OrderList.scss +160 -0
- package/src/components/OrderList/OrderList.tsx +885 -0
- package/src/components/OrderList/index.ts +1 -0
- package/src/components/ProductForm/ProductForm.scss +23 -0
- package/src/components/ProductForm/ProductForm.tsx +442 -0
- package/src/components/ProductForm/index.ts +3 -0
- package/src/components/ProductList/ProductList.scss +293 -0
- package/src/components/ProductList/ProductList.tsx +454 -0
- package/src/components/ProductList/index.ts +3 -0
- package/src/components/PromotionCard/PromotionCard.scss +71 -0
- package/src/components/PromotionCard/PromotionCard.tsx +579 -0
- package/src/components/PromotionCard/index.ts +1 -0
- package/src/components/RoleCard/RoleCard.scss +77 -0
- package/src/components/RoleCard/RoleCard.tsx +463 -0
- package/src/components/RoleCard/index.ts +1 -0
- package/src/components/UserCard/UserCard.scss +51 -0
- package/src/components/UserCard/UserCard.tsx +432 -0
- package/src/components/UserCard/index.ts +1 -0
- package/src/entry-components.ts +39 -0
- package/src/entry-meta.ts +23 -0
- package/src/index.scss +4 -0
- package/src/index.ts +36 -0
- package/src/index.tsx +17 -0
- package/src/meta/adminLayoutMeta.ts +154 -0
- package/src/meta/couponCardMeta.ts +287 -0
- package/src/meta/icons.ts +41 -0
- package/src/meta/orderFormMeta.ts +279 -0
- package/src/meta/orderListMeta.ts +443 -0
- package/src/meta/productFormMeta.ts +253 -0
- package/src/meta/productListMeta.ts +434 -0
- package/src/meta/promotionCardMeta.ts +276 -0
- package/src/meta/roleCardMeta.ts +142 -0
- package/src/meta/tabPaneMeta.ts +69 -0
- package/src/meta/userCardMeta.ts +128 -0
- package/src/meta.ts +25 -0
- package/src/setters/RestApiTester.tsx +219 -0
- package/src/shims/require.js +8 -0
- package/src/types/common.ts +19 -0
- package/src/types/marketing.ts +124 -0
- package/src/types/order.ts +169 -0
- package/src/types/permission.ts +102 -0
- package/src/types/product.ts +49 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import { Button, Input, Select, Card, Spin, Alert, Typography, Space } from 'antd'
|
|
3
|
+
import { PlayCircleOutlined, LoadingOutlined, CheckCircleOutlined, CloseCircleOutlined } from '@ant-design/icons'
|
|
4
|
+
|
|
5
|
+
const { TextArea } = Input
|
|
6
|
+
const { Text } = Typography
|
|
7
|
+
|
|
8
|
+
interface RestApiTesterProps {
|
|
9
|
+
value?: {
|
|
10
|
+
api: string
|
|
11
|
+
method: 'GET' | 'POST'
|
|
12
|
+
}
|
|
13
|
+
onChange?: (value: any) => void
|
|
14
|
+
multi?: boolean
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const RestApiTester: React.FC<RestApiTesterProps> = ({ value, onChange, multi }) => {
|
|
18
|
+
const [loading, setLoading] = useState(false)
|
|
19
|
+
const [response, setResponse] = useState<string>('')
|
|
20
|
+
const [error, setError] = useState<string>('')
|
|
21
|
+
const [status, setStatus] = useState<'idle' | 'success' | 'error'>('idle')
|
|
22
|
+
|
|
23
|
+
const api = value?.api || ''
|
|
24
|
+
const method = value?.method || 'GET'
|
|
25
|
+
|
|
26
|
+
const handleTestApi = async () => {
|
|
27
|
+
if (!api.trim()) {
|
|
28
|
+
setError('请输入 API 地址')
|
|
29
|
+
setStatus('error')
|
|
30
|
+
return
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
setLoading(true)
|
|
34
|
+
setError('')
|
|
35
|
+
setResponse('')
|
|
36
|
+
setStatus('idle')
|
|
37
|
+
|
|
38
|
+
try {
|
|
39
|
+
let url = api
|
|
40
|
+
if (!url.startsWith('http://') && !url.startsWith('https://')) {
|
|
41
|
+
url = `http://${url}`
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
console.log('[RestApiTester] 开始测试 API:', { url, method })
|
|
45
|
+
|
|
46
|
+
const fetchOptions: RequestInit = {
|
|
47
|
+
method,
|
|
48
|
+
headers: {
|
|
49
|
+
'Content-Type': 'application/json',
|
|
50
|
+
},
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (method === 'POST') {
|
|
54
|
+
fetchOptions.body = JSON.stringify({
|
|
55
|
+
pageNum: 1,
|
|
56
|
+
pageSize: 10,
|
|
57
|
+
})
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const res = await fetch(url, fetchOptions)
|
|
61
|
+
const data = await res.json()
|
|
62
|
+
|
|
63
|
+
console.log('[RestApiTester] API 响应:', data)
|
|
64
|
+
|
|
65
|
+
if (res.ok) {
|
|
66
|
+
setResponse(JSON.stringify(data, null, 2))
|
|
67
|
+
setStatus('success')
|
|
68
|
+
|
|
69
|
+
if (data.code === 200 && data.data && data.data.list) {
|
|
70
|
+
console.log(`[RestApiTester] 成功获取 ${data.data.list.length} 条数据`)
|
|
71
|
+
}
|
|
72
|
+
} else {
|
|
73
|
+
setError(`HTTP ${res.status}: ${res.statusText}`)
|
|
74
|
+
setStatus('error')
|
|
75
|
+
setResponse(JSON.stringify(data, null, 2))
|
|
76
|
+
}
|
|
77
|
+
} catch (err: any) {
|
|
78
|
+
console.error('[RestApiTester] API 测试失败:', err)
|
|
79
|
+
setError(err.message || '请求失败')
|
|
80
|
+
setStatus('error')
|
|
81
|
+
} finally {
|
|
82
|
+
setLoading(false)
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const handleApiChange = (newApi: string) => {
|
|
87
|
+
onChange?.({
|
|
88
|
+
...value,
|
|
89
|
+
api: newApi,
|
|
90
|
+
})
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const handleMethodChange = (newMethod: 'GET' | 'POST') => {
|
|
94
|
+
onChange?.({
|
|
95
|
+
...value,
|
|
96
|
+
method: newMethod,
|
|
97
|
+
})
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return (
|
|
101
|
+
<div style={{ width: '100%', padding: '8px 0' }}>
|
|
102
|
+
<Space direction="vertical" style={{ width: '100%' }} size="middle">
|
|
103
|
+
{/* API 配置区域 */}
|
|
104
|
+
<div>
|
|
105
|
+
<div style={{ marginBottom: 8 }}>
|
|
106
|
+
<Text strong style={{ fontSize: 14 }}>API 配置</Text>
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
<Space.Compact style={{ width: '100%' }}>
|
|
110
|
+
<Select
|
|
111
|
+
value={method}
|
|
112
|
+
onChange={handleMethodChange}
|
|
113
|
+
style={{ width: 120 }}
|
|
114
|
+
options={[
|
|
115
|
+
{ label: 'GET', value: 'GET' },
|
|
116
|
+
{ label: 'POST', value: 'POST' },
|
|
117
|
+
]}
|
|
118
|
+
/>
|
|
119
|
+
<Input
|
|
120
|
+
placeholder="请输入 API 地址,如 http://localhost:3000/lowcode/products"
|
|
121
|
+
value={api}
|
|
122
|
+
onChange={(e) => handleApiChange(e.target.value)}
|
|
123
|
+
onPressEnter={handleTestApi}
|
|
124
|
+
style={{ flex: 1 }}
|
|
125
|
+
allowClear
|
|
126
|
+
/>
|
|
127
|
+
<Button
|
|
128
|
+
type="primary"
|
|
129
|
+
icon={loading ? <LoadingOutlined /> : <PlayCircleOutlined />}
|
|
130
|
+
onClick={handleTestApi}
|
|
131
|
+
loading={loading}
|
|
132
|
+
disabled={!api.trim()}
|
|
133
|
+
>
|
|
134
|
+
执行
|
|
135
|
+
</Button>
|
|
136
|
+
</Space.Compact>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
{/* 状态提示 */}
|
|
140
|
+
{status === 'success' && (
|
|
141
|
+
<Alert
|
|
142
|
+
message="API 请求成功"
|
|
143
|
+
type="success"
|
|
144
|
+
showIcon
|
|
145
|
+
icon={<CheckCircleOutlined />}
|
|
146
|
+
closable
|
|
147
|
+
onClose={() => setStatus('idle')}
|
|
148
|
+
/>
|
|
149
|
+
)}
|
|
150
|
+
|
|
151
|
+
{status === 'error' && (
|
|
152
|
+
<Alert
|
|
153
|
+
message={`请求失败:${error}`}
|
|
154
|
+
type="error"
|
|
155
|
+
showIcon
|
|
156
|
+
icon={<CloseCircleOutlined />}
|
|
157
|
+
closable
|
|
158
|
+
onClose={() => {
|
|
159
|
+
setError('')
|
|
160
|
+
setStatus('idle')
|
|
161
|
+
}}
|
|
162
|
+
/>
|
|
163
|
+
)}
|
|
164
|
+
|
|
165
|
+
{/* 响应显示区域 */}
|
|
166
|
+
{(response || status === 'error') && (
|
|
167
|
+
<Card
|
|
168
|
+
size="small"
|
|
169
|
+
title={
|
|
170
|
+
<span>
|
|
171
|
+
Response
|
|
172
|
+
{status === 'success' && <Text type="success" style={{ marginLeft: 8 }}>✓</Text>}
|
|
173
|
+
{status === 'error' && <Text type="danger" style={{ marginLeft: 8 }}>✗</Text>}
|
|
174
|
+
</span>
|
|
175
|
+
}
|
|
176
|
+
style={{
|
|
177
|
+
backgroundColor: '#f5f5f5',
|
|
178
|
+
maxHeight: 400,
|
|
179
|
+
overflow: 'auto'
|
|
180
|
+
}}
|
|
181
|
+
>
|
|
182
|
+
<Spin spinning={loading}>
|
|
183
|
+
<TextArea
|
|
184
|
+
value={response || `Error: ${error}`}
|
|
185
|
+
autoSize={{ minRows: 6, maxRows: 15 }}
|
|
186
|
+
readOnly
|
|
187
|
+
style={{
|
|
188
|
+
backgroundColor: status === 'error' ? '#fff2f0' : '#fafafa',
|
|
189
|
+
fontFamily: 'Monaco, Menlo, Consolas, "Courier New", monospace',
|
|
190
|
+
fontSize: 12,
|
|
191
|
+
color: status === 'error' ? '#ff4d4f' : '#262626',
|
|
192
|
+
resize: 'none',
|
|
193
|
+
}}
|
|
194
|
+
/>
|
|
195
|
+
</Spin>
|
|
196
|
+
|
|
197
|
+
{status === 'success' && response && (() => {
|
|
198
|
+
try {
|
|
199
|
+
const jsonData = JSON.parse(response)
|
|
200
|
+
if (jsonData.code === 200 && jsonData.data && Array.isArray(jsonData.data.list)) {
|
|
201
|
+
return (
|
|
202
|
+
<div style={{ marginTop: 12, padding: '8px 12px', backgroundColor: '#f6ffed', borderRadius: 4, border: '1px solid #b7eb8f' }}>
|
|
203
|
+
<Text type="success" strong>
|
|
204
|
+
✓ 数据验证通过:共获取 {jsonData.data.total} 条数据,当前页显示 {jsonData.data.list.length} 条
|
|
205
|
+
</Text>
|
|
206
|
+
</div>
|
|
207
|
+
)
|
|
208
|
+
}
|
|
209
|
+
} catch (e) {}
|
|
210
|
+
return null
|
|
211
|
+
})()}
|
|
212
|
+
</Card>
|
|
213
|
+
)}
|
|
214
|
+
</Space>
|
|
215
|
+
</div>
|
|
216
|
+
)
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export default RestApiTester
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var require = function(module) {
|
|
2
|
+
if (module === 'react' || module === 'react/jsx-runtime') return window.React;
|
|
3
|
+
if (module === 'react-dom' || module === 'react-dom/client') return window.ReactDOM;
|
|
4
|
+
if (module === 'antd') return window.antd;
|
|
5
|
+
if (module === '@ant-design/icons') return window.icons;
|
|
6
|
+
if (module === 'moment') return window.moment;
|
|
7
|
+
throw new Error('Unknown module: ' + module);
|
|
8
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type CommonResult<T> = {
|
|
2
|
+
code: number
|
|
3
|
+
message: string
|
|
4
|
+
data: T
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export type CommonPage<T> = {
|
|
8
|
+
pageNum: number
|
|
9
|
+
pageSize: number
|
|
10
|
+
totalPage: number
|
|
11
|
+
total: number
|
|
12
|
+
list: T[]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type PageParam = {
|
|
16
|
+
pageNum: number
|
|
17
|
+
pageSize: number
|
|
18
|
+
keyword?: string
|
|
19
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
export interface SmsCoupon {
|
|
2
|
+
id: number
|
|
3
|
+
name: string
|
|
4
|
+
type: number
|
|
5
|
+
platform: number
|
|
6
|
+
count: number
|
|
7
|
+
amount: number
|
|
8
|
+
perLimit: number
|
|
9
|
+
minPoint: number
|
|
10
|
+
startTime: string
|
|
11
|
+
endTime: string
|
|
12
|
+
useType: number
|
|
13
|
+
note: string
|
|
14
|
+
publishCount: number
|
|
15
|
+
useCount: number
|
|
16
|
+
receiveCount: number
|
|
17
|
+
enableTime: string
|
|
18
|
+
code: string
|
|
19
|
+
memberLevel: number
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface SmsCouponHistory {
|
|
23
|
+
id: number
|
|
24
|
+
couponId: number
|
|
25
|
+
memberId: number
|
|
26
|
+
memberNickname: string
|
|
27
|
+
useStatus: number
|
|
28
|
+
useTime: string
|
|
29
|
+
orderId: number
|
|
30
|
+
orderSn: string
|
|
31
|
+
getType: number
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface SmsFlashPromotion {
|
|
35
|
+
id: number
|
|
36
|
+
title: string
|
|
37
|
+
startDate: string
|
|
38
|
+
endDate: string
|
|
39
|
+
status: number
|
|
40
|
+
createTime: string
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface SmsFlashPromotionSession {
|
|
44
|
+
id: number
|
|
45
|
+
name: string
|
|
46
|
+
startTime: number
|
|
47
|
+
endTime: number
|
|
48
|
+
status: number
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface SmsFlashPromotionProductRelation {
|
|
52
|
+
id: number
|
|
53
|
+
flashPromotionId: number
|
|
54
|
+
flashPromotionSessionId: number
|
|
55
|
+
productId: number
|
|
56
|
+
productName: string
|
|
57
|
+
productSn: string
|
|
58
|
+
flashPromotionPrice: number
|
|
59
|
+
flashPromotionCount: number
|
|
60
|
+
flashPromotionLimit: number
|
|
61
|
+
sort: number
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface CouponQueryParam {
|
|
65
|
+
pageNum?: number
|
|
66
|
+
pageSize?: number
|
|
67
|
+
name?: string
|
|
68
|
+
type?: number
|
|
69
|
+
platform?: number
|
|
70
|
+
useType?: number
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface PromotionQueryParam {
|
|
74
|
+
pageNum?: number
|
|
75
|
+
pageSize?: number
|
|
76
|
+
title?: string
|
|
77
|
+
status?: number
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export const COUPON_TYPE = {
|
|
81
|
+
FULL_REDUCTION: 0,
|
|
82
|
+
DISCOUNT: 1,
|
|
83
|
+
} as const
|
|
84
|
+
|
|
85
|
+
export const COUPON_PLATFORM = {
|
|
86
|
+
ALL: 0,
|
|
87
|
+
MOBILE: 1,
|
|
88
|
+
PC: 2,
|
|
89
|
+
APP: 3,
|
|
90
|
+
} as const
|
|
91
|
+
|
|
92
|
+
export const COUPON_USE_TYPE = {
|
|
93
|
+
ALL: 0,
|
|
94
|
+
CATEGORY: 1,
|
|
95
|
+
PRODUCT: 2,
|
|
96
|
+
} as const
|
|
97
|
+
|
|
98
|
+
export const COUPON_TYPE_OPTIONS = [
|
|
99
|
+
{ label: '满减券', value: COUPON_TYPE.FULL_REDUCTION },
|
|
100
|
+
{ label: '折扣券', value: COUPON_TYPE.DISCOUNT },
|
|
101
|
+
]
|
|
102
|
+
|
|
103
|
+
export const COUPON_PLATFORM_OPTIONS = [
|
|
104
|
+
{ label: '全平台', value: COUPON_PLATFORM.ALL },
|
|
105
|
+
{ label: '移动端', value: COUPON_PLATFORM.MOBILE },
|
|
106
|
+
{ label: 'PC端', value: COUPON_PLATFORM.PC },
|
|
107
|
+
{ label: 'APP端', value: COUPON_PLATFORM.APP },
|
|
108
|
+
]
|
|
109
|
+
|
|
110
|
+
export const COUPON_USE_TYPE_OPTIONS = [
|
|
111
|
+
{ label: '全场通用', value: COUPON_USE_TYPE.ALL },
|
|
112
|
+
{ label: '指定分类', value: COUPON_USE_TYPE.CATEGORY },
|
|
113
|
+
{ label: '指定商品', value: COUPON_USE_TYPE.PRODUCT },
|
|
114
|
+
]
|
|
115
|
+
|
|
116
|
+
export const PROMOTION_STATUS = {
|
|
117
|
+
ENABLED: 1,
|
|
118
|
+
DISABLED: 0,
|
|
119
|
+
} as const
|
|
120
|
+
|
|
121
|
+
export const PROMOTION_STATUS_OPTIONS = [
|
|
122
|
+
{ label: '启用', value: PROMOTION_STATUS.ENABLED },
|
|
123
|
+
{ label: '禁用', value: PROMOTION_STATUS.DISABLED },
|
|
124
|
+
]
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
export interface OmsOrder {
|
|
2
|
+
id: number
|
|
3
|
+
memberId?: number
|
|
4
|
+
couponId?: number
|
|
5
|
+
orderSn?: string
|
|
6
|
+
createTime: string
|
|
7
|
+
memberUsername?: string
|
|
8
|
+
totalAmount: number
|
|
9
|
+
payAmount: number
|
|
10
|
+
freightAmount: number
|
|
11
|
+
promotionAmount?: number
|
|
12
|
+
integrationAmount?: number
|
|
13
|
+
couponAmount?: number
|
|
14
|
+
discountAmount: number
|
|
15
|
+
payType: number
|
|
16
|
+
sourceType: number
|
|
17
|
+
status: number
|
|
18
|
+
orderType: number
|
|
19
|
+
deliveryCompany?: string
|
|
20
|
+
deliverySn?: string
|
|
21
|
+
autoConfirmDay?: number
|
|
22
|
+
integration?: number
|
|
23
|
+
growth?: number
|
|
24
|
+
promotionInfo: string
|
|
25
|
+
billType?: number
|
|
26
|
+
billHeader?: string
|
|
27
|
+
billContent?: string
|
|
28
|
+
billReceiverPhone?: string
|
|
29
|
+
billReceiverEmail?: string
|
|
30
|
+
receiverName?: string
|
|
31
|
+
receiverPhone?: string
|
|
32
|
+
receiverPostCode?: string
|
|
33
|
+
receiverProvince: string
|
|
34
|
+
receiverCity?: string
|
|
35
|
+
receiverRegion?: string
|
|
36
|
+
receiverDetailAddress?: string
|
|
37
|
+
note?: string
|
|
38
|
+
confirmStatus?: number
|
|
39
|
+
deleteStatus?: number
|
|
40
|
+
useIntegration?: number
|
|
41
|
+
paymentTime: string
|
|
42
|
+
deliveryTime: string
|
|
43
|
+
receiveTime: string
|
|
44
|
+
commentTime: string
|
|
45
|
+
modifyTime?: string
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface OmsOrderItem {
|
|
49
|
+
id: number
|
|
50
|
+
orderId: number
|
|
51
|
+
orderSn: string
|
|
52
|
+
productId: number
|
|
53
|
+
productPic: string
|
|
54
|
+
productName: string
|
|
55
|
+
productBrand: string
|
|
56
|
+
productSn: string
|
|
57
|
+
productPrice: number
|
|
58
|
+
productQuantity: number
|
|
59
|
+
productSkuId: number
|
|
60
|
+
productSkuCode: string
|
|
61
|
+
productCategoryId: number
|
|
62
|
+
promotionName: string
|
|
63
|
+
promotionAmount: number
|
|
64
|
+
couponAmount: number
|
|
65
|
+
integrationAmount: number
|
|
66
|
+
realAmount: number
|
|
67
|
+
giftIntegration: number
|
|
68
|
+
giftGrowth: number
|
|
69
|
+
productAttr: string
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface OmsOrderOperateHistory {
|
|
73
|
+
id: number
|
|
74
|
+
orderId: number
|
|
75
|
+
operateMan: string
|
|
76
|
+
createTime: string
|
|
77
|
+
orderStatus: number
|
|
78
|
+
note: string
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface OrderQueryParam {
|
|
82
|
+
pageNum?: number
|
|
83
|
+
pageSize?: number
|
|
84
|
+
orderSn?: string
|
|
85
|
+
receiverKeyword?: string
|
|
86
|
+
status?: number
|
|
87
|
+
orderType?: number
|
|
88
|
+
sourceType?: number
|
|
89
|
+
createTime?: string
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface OmsOrderDeliveryParam {
|
|
93
|
+
orderId: number
|
|
94
|
+
deliveryCompany?: string
|
|
95
|
+
deliverySn?: string
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface OmsOrderDetail extends OmsOrder {
|
|
99
|
+
orderItemList: OmsOrderItem[]
|
|
100
|
+
historyList: OmsOrderOperateHistory[]
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface OmsReceiverInfoParam {
|
|
104
|
+
orderId: number
|
|
105
|
+
receiverName?: string
|
|
106
|
+
receiverPhone?: string
|
|
107
|
+
receiverPostCode?: string
|
|
108
|
+
receiverDetailAddress?: string
|
|
109
|
+
receiverProvince?: string
|
|
110
|
+
receiverCity?: string
|
|
111
|
+
receiverRegion?: string
|
|
112
|
+
status: number
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface OmsMoneyInfoParam {
|
|
116
|
+
orderId: number
|
|
117
|
+
freightAmount: number
|
|
118
|
+
discountAmount: number
|
|
119
|
+
status: number
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export const ORDER_STATUS = {
|
|
123
|
+
PENDING_PAYMENT: 0,
|
|
124
|
+
PENDING_DELIVERY: 1,
|
|
125
|
+
DELIVERED: 2,
|
|
126
|
+
COMPLETED: 3,
|
|
127
|
+
CLOSED: 4,
|
|
128
|
+
INVALID: 5,
|
|
129
|
+
} as const
|
|
130
|
+
|
|
131
|
+
export const PAY_TYPE = {
|
|
132
|
+
UNPAID: 0,
|
|
133
|
+
ALIPAY: 1,
|
|
134
|
+
WECHAT: 2,
|
|
135
|
+
} as const
|
|
136
|
+
|
|
137
|
+
export const SOURCE_TYPE = {
|
|
138
|
+
PC: 0,
|
|
139
|
+
APP: 1,
|
|
140
|
+
} as const
|
|
141
|
+
|
|
142
|
+
export const ORDER_TYPE = {
|
|
143
|
+
NORMAL: 0,
|
|
144
|
+
SECKILL: 1,
|
|
145
|
+
} as const
|
|
146
|
+
|
|
147
|
+
export const ORDER_STATUS_OPTIONS = [
|
|
148
|
+
{ label: '待付款', value: ORDER_STATUS.PENDING_PAYMENT },
|
|
149
|
+
{ label: '待发货', value: ORDER_STATUS.PENDING_DELIVERY },
|
|
150
|
+
{ label: '已发货', value: ORDER_STATUS.DELIVERED },
|
|
151
|
+
{ label: '已完成', value: ORDER_STATUS.COMPLETED },
|
|
152
|
+
{ label: '已关闭', value: ORDER_STATUS.CLOSED },
|
|
153
|
+
]
|
|
154
|
+
|
|
155
|
+
export const PAY_TYPE_OPTIONS = [
|
|
156
|
+
{ label: '未支付', value: PAY_TYPE.UNPAID },
|
|
157
|
+
{ label: '支付宝', value: PAY_TYPE.ALIPAY },
|
|
158
|
+
{ label: '微信', value: PAY_TYPE.WECHAT },
|
|
159
|
+
]
|
|
160
|
+
|
|
161
|
+
export const SOURCE_TYPE_OPTIONS = [
|
|
162
|
+
{ label: 'PC订单', value: SOURCE_TYPE.PC },
|
|
163
|
+
{ label: 'APP订单', value: SOURCE_TYPE.APP },
|
|
164
|
+
]
|
|
165
|
+
|
|
166
|
+
export const ORDER_TYPE_OPTIONS = [
|
|
167
|
+
{ label: '正常订单', value: ORDER_TYPE.NORMAL },
|
|
168
|
+
{ label: '秒杀订单', value: ORDER_TYPE.SECKILL },
|
|
169
|
+
]
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
export interface UmsAdmin {
|
|
2
|
+
id: number
|
|
3
|
+
username: string
|
|
4
|
+
password?: string
|
|
5
|
+
icon?: string
|
|
6
|
+
email?: string
|
|
7
|
+
nickName?: string
|
|
8
|
+
note?: string
|
|
9
|
+
createTime: string
|
|
10
|
+
loginTime?: string
|
|
11
|
+
status: number
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface UmsRole {
|
|
15
|
+
id: number
|
|
16
|
+
name: string
|
|
17
|
+
description?: string
|
|
18
|
+
adminCount: number
|
|
19
|
+
createTime: string
|
|
20
|
+
status: number
|
|
21
|
+
sort: number
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface UmsPermission {
|
|
25
|
+
id: number
|
|
26
|
+
pid: number
|
|
27
|
+
name: string
|
|
28
|
+
value: string
|
|
29
|
+
icon: string
|
|
30
|
+
type: number
|
|
31
|
+
uri: string
|
|
32
|
+
status: number
|
|
33
|
+
createTime: string
|
|
34
|
+
sort: number
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface UmsMenu {
|
|
38
|
+
id: number
|
|
39
|
+
parentId: number
|
|
40
|
+
name: string
|
|
41
|
+
level: number
|
|
42
|
+
sort: number
|
|
43
|
+
title: string
|
|
44
|
+
icon: string
|
|
45
|
+
hidden: number
|
|
46
|
+
createTime: string
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface UmsResource {
|
|
50
|
+
id: number
|
|
51
|
+
categoryId: number
|
|
52
|
+
name: string
|
|
53
|
+
url: string
|
|
54
|
+
description: string
|
|
55
|
+
createTime: string
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface UserQueryParam {
|
|
59
|
+
pageNum?: number
|
|
60
|
+
pageSize?: number
|
|
61
|
+
username?: string
|
|
62
|
+
status?: number
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface RoleQueryParam {
|
|
66
|
+
pageNum?: number
|
|
67
|
+
pageSize?: number
|
|
68
|
+
name?: string
|
|
69
|
+
status?: number
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export const USER_STATUS = {
|
|
73
|
+
DISABLED: 0,
|
|
74
|
+
ENABLED: 1,
|
|
75
|
+
} as const
|
|
76
|
+
|
|
77
|
+
export const ROLE_STATUS = {
|
|
78
|
+
DISABLED: 0,
|
|
79
|
+
ENABLED: 1,
|
|
80
|
+
} as const
|
|
81
|
+
|
|
82
|
+
export const PERMISSION_TYPE = {
|
|
83
|
+
DIRECTORY: 0,
|
|
84
|
+
MENU: 1,
|
|
85
|
+
BUTTON: 2,
|
|
86
|
+
} as const
|
|
87
|
+
|
|
88
|
+
export const USER_STATUS_OPTIONS = [
|
|
89
|
+
{ label: '禁用', value: USER_STATUS.DISABLED },
|
|
90
|
+
{ label: '启用', value: USER_STATUS.ENABLED },
|
|
91
|
+
]
|
|
92
|
+
|
|
93
|
+
export const ROLE_STATUS_OPTIONS = [
|
|
94
|
+
{ label: '禁用', value: ROLE_STATUS.DISABLED },
|
|
95
|
+
{ label: '启用', value: ROLE_STATUS.ENABLED },
|
|
96
|
+
]
|
|
97
|
+
|
|
98
|
+
export const PERMISSION_TYPE_OPTIONS = [
|
|
99
|
+
{ label: '目录', value: PERMISSION_TYPE.DIRECTORY },
|
|
100
|
+
{ label: '菜单', value: PERMISSION_TYPE.MENU },
|
|
101
|
+
{ label: '按钮', value: PERMISSION_TYPE.BUTTON },
|
|
102
|
+
]
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { PageParam } from './common'
|
|
2
|
+
|
|
3
|
+
export type PmsProduct = {
|
|
4
|
+
id?: number
|
|
5
|
+
brandId?: number
|
|
6
|
+
productCategoryId?: number
|
|
7
|
+
name: string
|
|
8
|
+
pic?: string
|
|
9
|
+
productSn: string
|
|
10
|
+
deleteStatus?: number
|
|
11
|
+
publishStatus?: number
|
|
12
|
+
newStatus?: number
|
|
13
|
+
recommandStatus?: number
|
|
14
|
+
verifyStatus?: number
|
|
15
|
+
sort?: number
|
|
16
|
+
sale?: number
|
|
17
|
+
price?: number
|
|
18
|
+
promotionPrice?: number
|
|
19
|
+
subTitle?: string
|
|
20
|
+
originalPrice?: number
|
|
21
|
+
stock?: number
|
|
22
|
+
lowStock?: number
|
|
23
|
+
unit?: string
|
|
24
|
+
weight?: number
|
|
25
|
+
previewStatus?: number
|
|
26
|
+
serviceIds?: string
|
|
27
|
+
keywords?: string
|
|
28
|
+
note?: string
|
|
29
|
+
albumPics?: string
|
|
30
|
+
detailTitle?: string
|
|
31
|
+
promotionStartTime?: string
|
|
32
|
+
promotionEndTime?: string
|
|
33
|
+
promotionPerLimit?: number
|
|
34
|
+
promotionType?: number
|
|
35
|
+
brandName?: string
|
|
36
|
+
productCategoryName?: string
|
|
37
|
+
description?: string
|
|
38
|
+
detailDesc?: string
|
|
39
|
+
detailHtml?: string
|
|
40
|
+
detailMobileHtml?: string
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type ProductQueryParam = PageParam & {
|
|
44
|
+
publishStatus?: number
|
|
45
|
+
verifyStatus?: number
|
|
46
|
+
productSn?: string
|
|
47
|
+
productCategoryId?: number
|
|
48
|
+
brandId?: number
|
|
49
|
+
}
|