Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
merchant-manage-ui
Commits
f8cb4ca5
Commit
f8cb4ca5
authored
Jun 06, 2023
by
武广
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 升级antd + react
parent
6ddb7c73
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
40725 additions
and
1023 deletions
+40725
-1023
package-lock.json
package-lock.json
+40547
-999
package.json
package.json
+5
-3
global.less
src/global.less
+7
-0
CustomerInfo.jsx
src/pages/businessCustomer/components/CustomerInfo.jsx
+2
-2
MealSection.jsx
src/pages/businessCustomer/components/MealSection.jsx
+1
-1
index.jsx
src/pages/businessCustomer/index.jsx
+1
-1
index.js
src/pages/businessCustomer/staticData/index.js
+1
-1
SaleDateModal.jsx
src/pages/businessGoods/components/SaleDateModal.jsx
+48
-0
api.js
src/pages/businessGoods/service/api.js
+17
-0
goods.js
src/pages/businessGoods/staticData/goods.js
+12
-2
index.less
src/pages/businessGoods/style/index.less
+8
-0
takeawayGoods.jsx
src/pages/businessGoods/takeawayGoods.jsx
+65
-14
utils.less
src/utils/utils.less
+11
-0
No files found.
package-lock.json
View file @
f8cb4ca5
This source diff could not be displayed because it is too large. You can
view the blob
instead.
package.json
View file @
f8cb4ca5
...
@@ -51,12 +51,14 @@
...
@@ -51,12 +51,14 @@
"dependencies"
:
{
"dependencies"
:
{
"
@ant-design/colors
"
:
"
^3.1.0
"
,
"
@ant-design/colors
"
:
"
^3.1.0
"
,
"
@ant-design/compatible
"
:
"
^1.1.0
"
,
"
@ant-design/compatible
"
:
"
^1.1.0
"
,
"
@ant-design/cssinjs
"
:
"
^1.10.1
"
,
"
@ant-design/icons
"
:
"
^4.7.0
"
,
"
@ant-design/icons
"
:
"
^4.7.0
"
,
"
@ant-design/pro-components
"
:
"
^2.3.59
"
,
"
@ant-design/pro-layout
"
:
"
^4.11.4
"
,
"
@ant-design/pro-layout
"
:
"
^4.11.4
"
,
"
@ant-design/pro-table
"
:
"
^1.0.31
"
,
"
@ant-design/pro-table
"
:
"
^1.0.31
"
,
"
@antv/data-set
"
:
"
^0.10.2
"
,
"
@antv/data-set
"
:
"
^0.10.2
"
,
"
@sentry/react
"
:
"
^7.41.0
"
,
"
@sentry/react
"
:
"
^7.41.0
"
,
"
antd
"
:
"
^4.
19.3
"
,
"
antd
"
:
"
^4.
24.10
"
,
"
antd-img-crop
"
:
"
4.12.2
"
,
"
antd-img-crop
"
:
"
4.12.2
"
,
"
antd-virtual-select
"
:
"
^1.1.2
"
,
"
antd-virtual-select
"
:
"
^1.1.2
"
,
"
array-move
"
:
"
^4.0.0
"
,
"
array-move
"
:
"
^4.0.0
"
,
...
@@ -71,13 +73,13 @@
...
@@ -71,13 +73,13 @@
"
path-to-regexp
"
:
"
^3.1.0
"
,
"
path-to-regexp
"
:
"
^3.1.0
"
,
"
pubsub-js
"
:
"
^1.9.4
"
,
"
pubsub-js
"
:
"
^1.9.4
"
,
"
qs
"
:
"
^6.9.0
"
,
"
qs
"
:
"
^6.9.0
"
,
"
react
"
:
"
^16.
8.6
"
,
"
react
"
:
"
^16.
14.0
"
,
"
react-amap
"
:
"
^1.2.8
"
,
"
react-amap
"
:
"
^1.2.8
"
,
"
react-bmapgl
"
:
"
^0.2.17
"
,
"
react-bmapgl
"
:
"
^0.2.17
"
,
"
react-copy-to-clipboard
"
:
"
^5.0.1
"
,
"
react-copy-to-clipboard
"
:
"
^5.0.1
"
,
"
react-dnd
"
:
"
10.0.2
"
,
"
react-dnd
"
:
"
10.0.2
"
,
"
react-dnd-html5-backend
"
:
"
10.0.2
"
,
"
react-dnd-html5-backend
"
:
"
10.0.2
"
,
"
react-dom
"
:
"
^16.
8.6
"
,
"
react-dom
"
:
"
^16.
14.0
"
,
"
react-helmet
"
:
"
^5.2.1
"
,
"
react-helmet
"
:
"
^5.2.1
"
,
"
react-router-dom
"
:
"
^5.1.2
"
,
"
react-router-dom
"
:
"
^5.1.2
"
,
"
react-sortable-hoc
"
:
"
^2.0.0
"
,
"
react-sortable-hoc
"
:
"
^2.0.0
"
,
...
...
src/global.less
View file @
f8cb4ca5
...
@@ -69,3 +69,10 @@ ol {
...
@@ -69,3 +69,10 @@ ol {
}
}
}
}
}
}
.ant-pro-card-body {
padding: 0 !important;
}
.ant-pro-table-list-toolbar-container {
box-sizing: border-box;
padding: 10px 30px !important;
}
src/pages/businessCustomer/components/CustomerInfo.jsx
View file @
f8cb4ca5
...
@@ -2,7 +2,7 @@ import React, { useState } from 'react';
...
@@ -2,7 +2,7 @@ import React, { useState } from 'react';
import
{
Button
,
Divider
,
Form
,
Input
,
Checkbox
,
Col
,
Row
,
Modal
,
Select
}
from
'
antd
'
;
import
{
Button
,
Divider
,
Form
,
Input
,
Checkbox
,
Col
,
Row
,
Modal
,
Select
}
from
'
antd
'
;
import
{
ExclamationCircleOutlined
}
from
'
@ant-design/icons
'
;
import
{
ExclamationCircleOutlined
}
from
'
@ant-design/icons
'
;
import
{
jsonToArray
}
from
'
@/utils/utils
'
;
import
{
jsonToArray
}
from
'
@/utils/utils
'
;
import
{
layout
,
typeOptions
,
boolOptions
,
infoOptions
}
from
'
../
model
/index
'
;
import
{
layout
,
typeOptions
,
boolOptions
,
infoOptions
}
from
'
../
staticData
/index
'
;
import
style
from
'
../style/info.less
'
;
import
style
from
'
../style/info.less
'
;
import
MealSection
from
'
./MealSection
'
;
import
MealSection
from
'
./MealSection
'
;
import
MealLimit
from
'
./MealLimit
'
;
import
MealLimit
from
'
./MealLimit
'
;
...
@@ -93,7 +93,7 @@ const CustomerInfo = props => {
...
@@ -93,7 +93,7 @@ const CustomerInfo = props => {
return
(
return
(
<
Modal
<
Modal
title=
"企业客户信息"
title=
"企业客户信息"
visible
=
{
props
.
visible
}
open
=
{
props
.
visible
}
destroyOnClose
destroyOnClose
maskClosable=
{
false
}
maskClosable=
{
false
}
width=
"850px"
width=
"850px"
...
...
src/pages/businessCustomer/components/MealSection.jsx
View file @
f8cb4ca5
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
{
Form
,
Space
,
Checkbox
,
TimePicker
}
from
'
antd
'
;
import
{
Form
,
Space
,
Checkbox
,
TimePicker
}
from
'
antd
'
;
import
{
mealSections
}
from
'
../
model
/index
'
;
import
{
mealSections
}
from
'
../
staticData
/index
'
;
const
MealSection
=
props
=>
const
MealSection
=
props
=>
mealSections
.
map
(
field
=>
(
mealSections
.
map
(
field
=>
(
...
...
src/pages/businessCustomer/index.jsx
View file @
f8cb4ca5
...
@@ -2,7 +2,7 @@ import React, { useState, useRef } from 'react';
...
@@ -2,7 +2,7 @@ import React, { useState, useRef } from 'react';
import
ProTable
from
'
@ant-design/pro-table
'
;
import
ProTable
from
'
@ant-design/pro-table
'
;
import
{
Button
}
from
'
antd
'
;
import
{
Button
}
from
'
antd
'
;
import
{
PlusOutlined
}
from
'
@ant-design/icons
'
;
import
{
PlusOutlined
}
from
'
@ant-design/icons
'
;
import
{
customerColumn
}
from
'
./
model
/index
'
;
import
{
customerColumn
}
from
'
./
staticData
/index
'
;
import
CustomerInfo
from
'
./components/CustomerInfo
'
;
import
CustomerInfo
from
'
./components/CustomerInfo
'
;
const
BusinessCustomer
=
()
=>
{
const
BusinessCustomer
=
()
=>
{
...
...
src/pages/businessCustomer/
model
/index.js
→
src/pages/businessCustomer/
staticData
/index.js
View file @
f8cb4ca5
...
@@ -73,7 +73,7 @@ export const customerColumn = options => {
...
@@ -73,7 +73,7 @@ export const customerColumn = options => {
export
const
typeOptions
=
{
export
const
typeOptions
=
{
1
:
'
外卖
'
,
1
:
'
外卖
'
,
2
:
'
自助餐
'
,
2
:
'
自助餐
'
,
3
:
'
到店
'
,
4
:
'
到店
'
,
};
};
export
const
infoOptions
=
[
export
const
infoOptions
=
[
...
...
src/pages/businessGoods/components/SaleDateModal.jsx
0 → 100644
View file @
f8cb4ca5
import
React
,
{
useState
}
from
'
react
'
;
import
{
Form
,
Input
,
Radio
,
Space
,
Col
,
Row
,
Modal
}
from
'
antd
'
;
import
{
ExclamationCircleOutlined
}
from
'
@ant-design/icons
'
;
import
{
jsonToArray
}
from
'
@/utils/utils
'
;
import
{
weekOptions
}
from
'
../staticData/goods
'
;
const
SaleDateModal
=
props
=>
{
const
[
form
]
=
Form
.
useForm
();
const
[
value
,
setValue
]
=
useState
(
1
);
// 关闭分组信息弹窗
const
handleCancel
=
()
=>
{
props
.
handleClose
(
false
);
};
const
onChangeWeek
=
e
=>
{
setValue
(
e
.
target
.
value
);
};
// 添加/保存分组
const
handleConfirm
=
async
()
=>
{
const
res
=
await
form
.
validateFields
();
console
.
log
(
'
res :>>
'
,
res
);
};
console
.
log
(
'
visible :>>
'
,
props
.
visible
);
return
(
<
Modal
title=
"设置可售日期"
open=
{
props
.
visible
}
destroyOnClose
maskClosable=
{
false
}
width=
"200px"
onOk=
{
handleConfirm
}
onCancel=
{
handleCancel
}
>
<
Radio
.
Group
onChange=
{
onChangeWeek
}
value=
{
value
}
>
<
Space
direction=
"vertical"
>
{
Object
.
keys
(
weekOptions
).
map
(
key
=>
(
<
Radio
value=
{
key
}
>
{
weekOptions
[
key
]
}
</
Radio
>
))
}
</
Space
>
</
Radio
.
Group
>
</
Modal
>
);
};
export
default
SaleDateModal
;
src/pages/businessGoods/service/api.js
0 → 100644
View file @
f8cb4ca5
import
request
from
'
@/utils/request
'
;
import
config
from
'
@/../config/env.config
'
;
// import qs from 'qs';
const
{
kdspApi
,
goodsApi
}
=
config
;
/**
* 获取企业外卖商品列表
* http://yapi.quantgroups.com/project/389/interface/api/64794
*/
export
async
function
apiTakeawayList
(
param
)
{
return
request
.
post
(
'
/v1/channels/products/pick/b/pageList
'
,
{
data
:
param
,
prefix
:
goodsApi
,
});
}
src/pages/businessGoods/
model
/goods.js
→
src/pages/businessGoods/
staticData
/goods.js
View file @
f8cb4ca5
...
@@ -16,8 +16,18 @@ export const mealColumn = {
...
@@ -16,8 +16,18 @@ export const mealColumn = {
4
:
'
晚餐
'
,
4
:
'
晚餐
'
,
};
};
export
const
weekOptions
=
{
1
:
'
周一
'
,
2
:
'
周二
'
,
3
:
'
周三
'
,
4
:
'
周四
'
,
5
:
'
周五
'
,
6
:
'
周六
'
,
7
:
'
周日
'
,
};
export
const
takeawayGoodsColumn
=
options
=>
{
export
const
takeawayGoodsColumn
=
options
=>
{
const
{
onDel
,
companyEnum
,
shopEnum
,
onChangeFlag
}
=
options
;
const
{
onDel
,
companyEnum
,
shopEnum
,
onChangeFlag
,
setVisibleSaleDate
}
=
options
;
return
[
return
[
{
{
title
:
'
企业名称
'
,
title
:
'
企业名称
'
,
...
@@ -60,7 +70,7 @@ export const takeawayGoodsColumn = options => {
...
@@ -60,7 +70,7 @@ export const takeawayGoodsColumn = options => {
render
:
(
_
,
record
)
=>
(
render
:
(
_
,
record
)
=>
(
<
Space
>
<
Space
>
<
span
>
{
_
}
<
/span
>
<
span
>
{
_
}
<
/span
>
<
span
>
<
span
onClick
=
{
setVisibleSaleDate
(
true
)}
>
<
FormOutlined
/>
<
FormOutlined
/>
<
/span
>
<
/span
>
<
/Space
>
<
/Space
>
...
...
src/pages/businessGoods/style/index.less
0 → 100644
View file @
f8cb4ca5
.search {
padding: 0;
:global {
.ant-form-item {
display: block !important;
}
}
}
src/pages/businessGoods/takeawayGoods.jsx
View file @
f8cb4ca5
import
React
,
{
useState
,
useRef
}
from
'
react
'
;
import
React
,
{
useState
,
useRef
}
from
'
react
'
;
import
ProTable
from
'
@ant-design/pro-table
'
;
import
{
ProTable
}
from
'
@ant-design/pro-components
'
;
import
{
Button
,
Space
}
from
'
antd
'
;
import
{
Button
,
Space
}
from
'
antd
'
;
import
{
PlusOutlined
}
from
'
@ant-design/icons
'
;
import
{
PlusOutlined
}
from
'
@ant-design/icons
'
;
import
{
takeawayGoodsColumn
}
from
'
./model/goods
'
;
import
{
takeawayGoodsColumn
}
from
'
./staticData/goods
'
;
// import CustomerInfo from './components/CustomerInfo';
import
utilStyle
from
'
@/utils/utils.less
'
;
import
{
apiTakeawayList
}
from
'
./service/api
'
;
import
SaleDateModal
from
'
./components/SaleDateModal
'
;
const
BusinessCustomer
=
()
=>
{
const
BusinessCustomer
=
()
=>
{
const
[
visible
,
setVisible
]
=
useState
(
true
);
const
[
visibleSaleDate
,
setVisibleSaleDate
]
=
useState
(
true
);
// 可售日期弹窗
const
query
=
async
()
=>
{};
const
[
visibleSaleSection
,
setVisibleSaleSection
]
=
useState
(
true
);
// 可售餐段弹窗
const
[
visiblePrice
,
setVisiblePrice
]
=
useState
(
true
);
// 修改企业商品价格弹窗
const
[
visibleSort
,
setVisibleSort
]
=
useState
(
true
);
// 商品排序弹窗
const
[
visibleGoods
,
setVisibleGoods
]
=
useState
(
true
);
// 添加外卖商品弹窗
const
[
activeKey
,
setActiveKey
]
=
useState
(
'
tab1
'
);
const
query
=
async
params
=>
{
console
.
log
(
'
params :>>
'
,
params
);
const
data
=
{
page
:
params
.
current
,
size
:
params
.
pageSize
,
data
:
params
,
};
return
apiTakeawayList
(
data
);
};
const
onDel
=
async
()
=>
{};
const
onDel
=
async
()
=>
{};
const
onAdd
=
async
()
=>
{};
const
options
=
{
setVisibleSaleDate
,
setVisibleSaleSection
,
setVisiblePrice
,
setVisibleSort
,
setVisibleGoods
,
onDel
,
};
return
(
return
(
<
div
>
<
div
>
<
ProTable
<
ProTable
search=
{
{
search=
{
{
span
:
6
,
className
:
utilStyle
.
formSearch
,
collapsed
:
false
,
collapsed
:
false
,
collapseRender
:
()
=>
null
,
collapseRender
:
()
=>
null
,
}
}
}
}
columns=
{
takeawayGoodsColumn
({
onDel
})
}
tableClassName=
{
utilStyle
.
formTable
}
columns=
{
takeawayGoodsColumn
(
options
)
}
request=
{
params
=>
query
({
...
params
})
}
request=
{
params
=>
query
({
...
params
})
}
rowKey=
{
r
=>
r
.
id
}
rowKey=
{
r
=>
r
.
id
}
expandIconColumnIndex=
{
10
}
expandIconColumnIndex=
{
10
}
bordered
bordered
// options={false}
options=
{
false
}
tableAlertRender=
{
()
=>
(
toolbar=
{
{
<
Space
>
menu
:
{
<
Button
>
111
</
Button
>
type
:
'
tab
'
,
<
Button
>
2222
</
Button
>
activeKey
,
</
Space
>
items
:
[
)
}
{
key
:
'
tab1
'
,
label
:
<
span
>
取餐点1
</
span
>,
},
{
key
:
'
tab2
'
,
label
:
<
span
>
取餐点2
</
span
>,
},
{
key
:
'
tab3
'
,
label
:
<
span
>
取餐点3
</
span
>,
},
],
onChange
:
key
=>
{
setActiveKey
(
key
);
},
},
actions
:
[
<
Button
key=
"1"
icon=
{
<
PlusOutlined
/>
}
type=
"primary"
onClick=
{
onAdd
}
>
添加外卖商品
</
Button
>,
],
}
}
scroll=
{
{
x
:
'
100%
'
,
y
:
400
}
}
scroll=
{
{
x
:
'
100%
'
,
y
:
400
}
}
/>
/>
{
/* <CustomerInfo visible={visible} /> */
}
{
visibleSaleDate
&&
(
<
SaleDateModal
visible=
{
visibleSaleDate
}
close=
{
()
=>
setVisibleSaleDate
(
false
)
}
/>
)
}
</
div
>
</
div
>
);
);
};
};
...
...
src/utils/utils.less
View file @
f8cb4ca5
...
@@ -48,3 +48,14 @@
...
@@ -48,3 +48,14 @@
visibility: hidden;
visibility: hidden;
}
}
}
}
.formSearch {
padding: 0;
:global {
.ant-form-item {
display: block !important;
}
}
}
.formTable {
padding: 0;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment