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
da4c606a
Commit
da4c606a
authored
Mar 24, 2022
by
luoxiaodong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交页面备注
parent
df7492db
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
64971 additions
and
127 deletions
+64971
-127
config.js
config/config.js
+29
-27
jsconfig.json
jsconfig.json
+2
-1
package-lock.json
package-lock.json
+64845
-0
package.json
package.json
+13
-14
AvatarDropdown.jsx
src/components/GlobalHeader/AvatarDropdown.jsx
+2
-2
BasicLayout.jsx
src/layouts/BasicLayout.jsx
+12
-9
user.js
src/models/user.js
+1
-1
404.jsx
src/pages/404.jsx
+2
-2
index.jsx
src/pages/AfterSaleManage/PassAudit/index.jsx
+1
-1
index.jsx
src/pages/AfterSaleManage/Pending/index.jsx
+1
-1
index.jsx
src/pages/GoodsManage/SearchForm/index.jsx
+54
-63
mixin.jsx
src/pages/GoodsManage/createModal/mixin.jsx
+1
-0
style.less
src/pages/GoodsManage/style.less
+1
-1
index.jsx
src/pages/afterSaleAddress/index.jsx
+4
-2
index.jsx
src/pages/orderManage/batchDelivery/index.jsx
+2
-2
index.jsx
src/pages/reconciliation/index.jsx
+1
-1
No files found.
config/config.js
View file @
da4c606a
...
...
@@ -50,13 +50,15 @@ const plugins = [
];
export
default
{
plugins
,
block
:
{
// 国内用户可以使用码云
// defaultGitUrl: 'https://gitee.com/ant-design/pro-blocks',
defaultGitUrl
:
'
https://github.com/ant-design/pro-blocks
'
,
antd
:
{},
dva
:
{
hmr
:
true
,
},
hash
:
true
,
locale
:
{
default
:
'
zh-CN
'
,
//开启国际化配置,就必须要创建locales/zh-CN.ts 文件
baseNavigator
:
true
,
},
targets
:
{
ie
:
11
,
},
...
...
@@ -185,33 +187,33 @@ export default {
ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION
||
''
,
// preview.pro.ant.design only do not use in your production ; preview.pro.ant.design 专用环境变量,请不要在你的项目中使用它。
},
ignoreMomentLocale
:
true
,
lessLoader
Options
:
{
lessLoader
:
{
javascriptEnabled
:
true
,
},
disableRedirectHoist
:
true
,
cssLoaderOptions
:
{
modules
:
true
,
getLocalIdent
:
(
context
,
_
,
localName
)
=>
{
if
(
context
.
resourcePath
.
includes
(
'
node_modules
'
)
||
context
.
resourcePath
.
includes
(
'
ant.design.pro.less
'
)
||
context
.
resourcePath
.
includes
(
'
global.less
'
)
)
{
return
localName
;
}
cssLoader
:
{
modules
:
{
getLocalIdent
:
(
context
,
_
,
localName
)
=>
{
if
(
context
.
resourcePath
.
includes
(
'
node_modules
'
)
||
context
.
resourcePath
.
includes
(
'
ant.design.pro.less
'
)
||
context
.
resourcePath
.
includes
(
'
global.less
'
)
)
{
return
localName
;
}
const
match
=
context
.
resourcePath
.
match
(
/src
(
.*
)
/
);
const
match
=
context
.
resourcePath
.
match
(
/src
(
.*
)
/
);
if
(
match
&&
match
[
1
])
{
const
antdProPath
=
match
[
1
].
replace
(
'
.less
'
,
''
);
const
arr
=
slash
(
antdProPath
)
.
split
(
'
/
'
)
.
map
(
a
=>
a
.
replace
(
/
([
A-Z
])
/g
,
'
-$1
'
))
.
map
(
a
=>
a
.
toLowerCase
());
return
`antd-pro
${
arr
.
join
(
'
-
'
)}
-
${
localName
}
`
.
replace
(
/--/g
,
'
-
'
);
}
if
(
match
&&
match
[
1
])
{
const
antdProPath
=
match
[
1
].
replace
(
'
.less
'
,
''
);
const
arr
=
slash
(
antdProPath
)
.
split
(
'
/
'
)
.
map
(
a
=>
a
.
replace
(
/
([
A-Z
])
/g
,
'
-$1
'
))
.
map
(
a
=>
a
.
toLowerCase
());
return
`antd-pro
${
arr
.
join
(
'
-
'
)}
-
${
localName
}
`
.
replace
(
/--/g
,
'
-
'
);
}
return
localName
;
return
localName
;
},
},
},
chainWebpack
:
webpackPlugin
,
...
...
jsconfig.json
View file @
da4c606a
...
...
@@ -4,7 +4,8 @@
"experimentalDecorators"
:
true
,
"baseUrl"
:
"."
,
"paths"
:
{
"@/*"
:
[
"./src/*"
]
"@/*"
:
[
"./src/*"
],
"@@/*"
:
[
"./src/.uim/*"
]
}
}
}
package-lock.json
0 → 100644
View file @
da4c606a
This source diff could not be displayed because it is too large. You can
view the blob
instead.
package.json
View file @
da4c606a
...
...
@@ -48,14 +48,15 @@
"not ie <= 10"
],
"dependencies"
:
{
"
@ant-design/compatible
"
:
"
^1.0.0
"
,
"
@ant-design/icons
"
:
"
^4.6.4
"
,
"
@ant-design/colors
"
:
"
^3.1.0
"
,
"
@ant-design/pro-layout
"
:
"
^4.10.0
"
,
"
@ant-design/compatible
"
:
"
^1.1.0
"
,
"
@ant-design/icons
"
:
"
^4.7.0
"
,
"
@ant-design/pro-layout
"
:
"
^4.11.4
"
,
"
@ant-design/pro-table
"
:
"
^1.0.31
"
,
"
@antv/data-set
"
:
"
^0.10.2
"
,
"
antd
"
:
"
^4.
0.0
"
,
"
antd
"
:
"
^4.
19.3
"
,
"
antd-virtual-select
"
:
"
^1.1.2
"
,
"
babel-eslint
"
:
"
^10.1.0
"
,
"
classnames
"
:
"
^2.2.6
"
,
"
date-fns
"
:
"
^2.16.1
"
,
"
dva
"
:
"
^2.4.1
"
,
...
...
@@ -65,17 +66,14 @@
"
omit.js
"
:
"
^1.0.2
"
,
"
path-to-regexp
"
:
"
^3.1.0
"
,
"
qs
"
:
"
^6.9.0
"
,
"
react
"
:
"
^16.
9.0
"
,
"
react
"
:
"
^16.
8.6
"
,
"
react-copy-to-clipboard
"
:
"
^5.0.1
"
,
"
react-dom
"
:
"
^16.
9.0
"
,
"
react-dom
"
:
"
^16.
8.6
"
,
"
react-helmet
"
:
"
^5.2.1
"
,
"
react-sortablejs
"
:
"
^6.0.0
"
,
"
redux
"
:
"
^4.0.1
"
,
"
slash2
"
:
"
^2.0.0
"
,
"
sortablejs
"
:
"
^1.13.0
"
,
"
umi
"
:
"
^2.13.0
"
,
"
umi-plugin-pro-block
"
:
"
^1.3.4
"
,
"
umi-plugin-react
"
:
"
^1.10.1
"
,
"
umi
"
:
"
^3.0.0
"
,
"
umi-request
"
:
"
^1.2.7
"
,
"
webpack-theme-color-replacer
"
:
"
^1.2.15
"
},
...
...
@@ -91,6 +89,10 @@
"
@types/react-dom
"
:
"
^16.8.4
"
,
"
@types/react-helmet
"
:
"
^5.0.13
"
,
"
@umijs/fabric
"
:
"
^1.2.0
"
,
"
@umijs/plugin-blocks
"
:
"
^2.0.5
"
,
"
@umijs/preset-ant-design-pro
"
:
"
^1.0.1
"
,
"
@umijs/preset-react
"
:
"
^1.3.0
"
,
"
@umijs/preset-ui
"
:
"
^2.0.9
"
,
"
chalk
"
:
"
^2.4.2
"
,
"
check-prettier
"
:
"
^1.0.3
"
,
"
cross-env
"
:
"
^6.0.0
"
,
...
...
@@ -110,10 +112,7 @@
"
node-fetch
"
:
"
^2.6.0
"
,
"
prettier
"
:
"
^1.17.1
"
,
"
pro-download
"
:
"
1.0.1
"
,
"
stylelint
"
:
"
^10.1.0
"
,
"
umi-plugin-ga
"
:
"
^1.1.3
"
,
"
umi-plugin-pro
"
:
"
^1.0.2
"
,
"
umi-types
"
:
"
^0.5.0
"
"
stylelint
"
:
"
^10.1.0
"
},
"engines"
:
{
"node"
:
">=10.0.0"
...
...
src/components/GlobalHeader/AvatarDropdown.jsx
View file @
da4c606a
...
...
@@ -2,7 +2,7 @@ import { LogoutOutlined, SettingOutlined, UserOutlined } from '@ant-design/icons
import
{
Avatar
,
Menu
,
Spin
}
from
'
antd
'
;
import
React
from
'
react
'
;
import
{
connect
}
from
'
dva
'
;
import
router
from
'
umi/router
'
;
import
{
history
}
from
'
umi
'
;
import
HeaderDropdown
from
'
../HeaderDropdown
'
;
import
styles
from
'
./index.less
'
;
...
...
@@ -22,7 +22,7 @@ class AvatarDropdown extends React.Component {
return
;
}
router
.
push
(
`/account/
${
key
}
`
);
history
.
push
(
`/account/
${
key
}
`
);
};
render
()
{
...
...
src/layouts/BasicLayout.jsx
View file @
da4c606a
...
...
@@ -6,7 +6,7 @@
/* eslint-disable no-underscore-dangle, no-confusing-arrow */
import
ProLayout
from
'
@ant-design/pro-layout
'
;
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
Link
from
'
umi/link
'
;
import
{
Link
}
from
'
umi
'
;
import
{
connect
}
from
'
dva
'
;
import
{
Icon
as
LegacyIcon
}
from
'
@ant-design/compatible
'
;
import
{
Result
,
Button
,
Layout
,
Menu
}
from
'
antd
'
;
...
...
@@ -77,7 +77,6 @@ const BasicLayout = props => {
};
// get children authority
const
authorized
=
getAuthorityFromRouter
(
props
.
route
.
routes
,
location
.
pathname
||
'
/
'
);
const
_menu
=
param
=>
param
.
map
(
v
=>
v
.
children
&&
v
.
children
.
length
?
(
...
...
@@ -131,13 +130,17 @@ const BasicLayout = props => {
}
return
<
Link
to=
{
menuItemProps
.
path
}
>
{
defaultDom
}
</
Link
>;
}
}
breadcrumbRender=
{
(
routers
=
[])
=>
[
{
path
:
'
/
'
,
breadcrumbName
:
'
首页
'
,
},
...
routers
,
]
}
breadcrumbRender=
{
(
routers
=
[])
=>
{
if
(
routers
.
length
)
{
return
[
{
path
:
'
/
'
,
breadcrumbName
:
'
首页
'
,
},
...
routers
,
];
}
}
}
itemRender=
{
(
route
,
params
,
routes
,
paths
)
=>
{
const
first
=
routes
.
indexOf
(
route
)
===
0
;
return
first
?
(
...
...
src/models/user.js
View file @
da4c606a
import
{
queryCurrent
,
query
as
query
Users
,
homeInfo
}
from
'
@/services/user
'
;
import
{
queryCurrent
,
queryUsers
,
homeInfo
}
from
'
@/services/user
'
;
import
localStorage
from
'
@/utils/localStorage
'
;
const
UserModel
=
{
...
...
src/pages/404.jsx
View file @
da4c606a
import
{
Button
,
Result
}
from
'
antd
'
;
import
React
from
'
react
'
;
import
router
from
'
umi/router
'
;
// 这里应该使用 antd 的 404 result 组件,
import
{
history
}
from
'
umi
'
;
// 这里应该使用 antd 的 404 result 组件,
// 但是还没发布,先来个简单的。
const
NoFoundPage
=
()
=>
(
...
...
@@ -9,7 +9,7 @@ const NoFoundPage = () => (
title=
"404"
subTitle=
"Sorry, the page you visited does not exist."
extra=
{
<
Button
type=
"primary"
onClick=
{
()
=>
router
.
push
(
'
/
'
)
}
>
<
Button
type=
"primary"
onClick=
{
()
=>
history
.
push
(
'
/
'
)
}
>
Back Home
</
Button
>
}
...
...
src/pages/AfterSaleManage/PassAudit/index.jsx
View file @
da4c606a
...
...
@@ -155,7 +155,7 @@ export default () => {
<
ProTable
columns=
{
columns
}
request=
{
params
=>
searchList
(
params
,
2
)
}
rowKey=
"serviceNo"
rowKey=
{
r
=>
r
.
serviceNo
}
pagination=
{
{
pagesSize
:
20
,
}
}
...
...
src/pages/AfterSaleManage/Pending/index.jsx
View file @
da4c606a
...
...
@@ -102,7 +102,7 @@ export default () => {
<
ProTable
columns=
{
columns
}
request=
{
params
=>
searchList
(
params
,
1
)
}
rowKey=
"serviceNo"
rowKey=
{
r
=>
r
.
serviceNo
}
pagination=
{
{
pagesSize
:
20
,
}
}
...
...
src/pages/GoodsManage/SearchForm/index.jsx
View file @
da4c606a
import
{
Form
}
from
'
@ant-design/compatible
'
;
// import { Form } from '@ant-design/compatible';
// import '@ant-design/compatible/assets/index.css';
import
{
Form
,
Button
,
Input
,
Select
,
notification
,
Upload
,
Cascader
,
InputNumber
}
from
'
antd
'
;
import
'
@ant-design/compatible/assets/index.css
'
;
import
{
Button
,
Input
,
Select
,
notification
,
Upload
,
Cascader
,
InputNumber
}
from
'
antd
'
;
import
React
,
{
Component
}
from
'
react
'
;
import
{
connect
}
from
'
dva
'
;
import
styles
from
'
../style.less
'
;
...
...
@@ -13,38 +14,41 @@ const { Option } = Select;
goodsManage
,
}))
class
goodsManage
extends
Component
{
formRef
=
React
.
createRef
();
componentDidMount
()
{
this
.
props
.
onRef
(
this
);
this
.
handleSearch
();
}
getFieldsValue
()
{
const
{
form
}
=
this
.
props
;
const
form
=
this
.
formRef
.
current
;
return
form
.
getFieldsValue
();
}
handleSearch
=
()
=>
{
this
.
props
.
handleSearch
(
1
);
};
valueMin
=
value
=>
{
const
{
getFieldValue
,
setFieldsValue
}
=
this
.
formRef
.
current
;
const
minVal
=
getFieldValue
(
'
supplyPriceMin
'
);
if
(
minVal
&&
minVal
>
value
)
{
setFieldsValue
({
supplyPriceMax
:
minVal
});
}
};
onReset
=
()
=>
{
this
.
props
.
form
.
resetFields
();
const
form
=
this
.
formRef
.
current
;
form
.
resetFields
();
this
.
props
.
onReset
();
};
addSpu
=
()
=>
{
this
.
props
.
addSpu
();
};
render
()
{
const
{
form
:
{
getFieldDecorator
,
getFieldValue
},
treeData
,
}
=
this
.
props
;
const
{
treeData
}
=
this
.
props
;
const
selectW
=
{
width
:
250
};
const
iptNumWidth
=
{
width
:
118
};
const
that
=
this
;
// const uploadProps = {
// name: 'file',
// async customRequest(info) {
...
...
@@ -73,66 +77,53 @@ class goodsManage extends Component {
const
filterOption
=
(
input
,
op
)
=>
op
.
props
.
children
.
includes
(
input
);
return
(
<
Form
name=
"horizontal_login"
layout=
"inline"
className=
{
styles
.
searchForm
}
>
<
FormItem
label=
"SKU编码"
>
{
getFieldDecorator
(
'
skuId
'
,
{})(
<
Input
placeholder=
"请输入SKU编码"
allowClear
style=
{
selectW
}
/>,
)
}
<
Form
ref=
{
this
.
formRef
}
name=
"horizontal_login"
layout=
"inline"
className=
{
styles
.
searchForm
}
>
<
FormItem
label=
"SKU编码"
name=
"skuId"
>
<
Input
placeholder=
"请输入SKU编码"
allowClear
style=
{
selectW
}
/>
</
FormItem
>
<
FormItem
label=
"商品名称"
>
{
getFieldDecorator
(
'
skuName
'
,
{})(
<
Input
placeholder=
"请输入商品名称"
allowClear
style=
{
selectW
}
/>,
)
}
<
FormItem
label=
"商品名称"
name=
"skuName"
>
<
Input
placeholder=
"请输入商品名称"
allowClear
style=
{
selectW
}
/>
</
FormItem
>
<
FormItem
label=
"类目"
>
{
getFieldDecorator
(
'
productCategoryId
'
,
{})(
<
Cascader
placeholder=
"请选择类目"
style=
{
selectW
}
showSearch
changeOnSelect
fieldNames=
{
{
label
:
'
name
'
,
value
:
'
id
'
,
children
:
'
children
'
}
}
options=
{
treeData
}
/>,
)
}
<
FormItem
label=
"类目"
name=
"productCategoryId"
>
<
Cascader
placeholder=
"请选择类目"
style=
{
selectW
}
showSearch
changeOnSelect
fieldNames=
{
{
label
:
'
name
'
,
value
:
'
id
'
,
children
:
'
children
'
}
}
options=
{
treeData
}
/>
</
FormItem
>
<
FormItem
label=
"审核状态"
>
{
getFieldDecorator
(
'
state
'
,
{})(
<
Select
style=
{
selectW
}
placeholder=
"请选择审核状态"
allowClear
filterOption=
{
filterOption
}
>
{
stateList
?.
map
(
item
=>
(
<
Option
key=
{
item
.
value
}
value=
{
item
.
value
}
>
{
item
.
label
}
</
Option
>
))
}
</
Select
>,
)
}
<
FormItem
label=
"审核状态"
name=
"state"
>
<
Select
style=
{
selectW
}
placeholder=
"请选择审核状态"
allowClear
filterOption=
{
filterOption
}
>
{
stateList
?.
map
(
item
=>
(
<
Option
key=
{
item
.
value
}
value=
{
item
.
value
}
>
{
item
.
label
}
</
Option
>
))
}
</
Select
>
</
FormItem
>
<
FormItem
label=
"供货价区间"
>
<
FormItem
className=
{
styles
.
iptNumRight
}
>
{
getFieldDecorator
(
'
supplyPriceMin
'
,
{})(
<
InputNumber
placeholder=
"请输入"
style=
{
iptNumWidth
}
/>,
)
}
<
FormItem
name=
"supplyPriceMin"
className=
{
styles
.
iptNumRight
}
noStyle
>
<
InputNumber
placeholder=
"请输入"
style=
{
iptNumWidth
}
/>
</
FormItem
>
<
span
>
--
</
span
>
<
FormItem
className=
{
styles
.
iptNumRight
}
>
{
getFieldDecorator
(
'
supplyPriceMax
'
,
{})(
<
InputNumber
style=
{
iptNumWidth
}
placeholder=
"请输入"
min=
{
getFieldValue
(
'
supplyPriceMin
'
)
}
/>,
)
}
<
FormItem
name=
"supplyPriceMax"
className=
{
styles
.
iptNumRight
}
noStyle
>
<
InputNumber
style=
{
iptNumWidth
}
placeholder=
"请输入"
onChange=
{
this
.
valueMin
}
/>
</
FormItem
>
</
FormItem
>
<
FormItem
label=
"第三方SKU编码"
>
{
getFieldDecorator
(
'
thirdSkuNo
'
,
{})(
<
Input
placeholder=
"请输入第三方SKU编码"
allowClear
style=
{
selectW
}
/>,
)
}
<
FormItem
name=
"thirdSkuNo"
label=
"第三方SKU编码"
>
<
Input
placeholder=
"请输入第三方SKU编码"
allowClear
style=
{
selectW
}
/>
</
FormItem
>
<
FormItem
className=
{
styles
.
queryBtn
}
>
<
Button
onClick=
{
()
=>
this
.
handleSearch
()
}
type=
"primary"
className=
{
styles
.
button
}
>
...
...
@@ -168,4 +159,4 @@ class goodsManage extends Component {
}
}
export
default
Form
.
create
()(
goodsManage
)
;
export
default
goodsManage
;
src/pages/GoodsManage/createModal/mixin.jsx
View file @
da4c606a
...
...
@@ -329,6 +329,7 @@ export function editColumns(methods, firstData, firstSpec, secondSpec, isJDGoods
];
if
(
productType
===
1
)
{
// 如果是实体商品添加重量
console
.
log
(
arr
);
arr
.
splice
(
2
,
0
,
{
title
:
'
重量(kg)
'
,
align
:
'
center
'
,
...
...
src/pages/GoodsManage/style.less
View file @
da4c606a
...
...
@@ -51,7 +51,7 @@
.searchForm {
:global {
.ant-form-item-label {
width: 12
0px;
line-height: 4
0px;
}
}
}
...
...
src/pages/afterSaleAddress/index.jsx
View file @
da4c606a
...
...
@@ -63,7 +63,9 @@ const TableList = () => {
renderFormItem
:
()
=>
(
<
Select
onChange=
{
changeSupplier
}
value=
{
shopId
}
allowClear
>
{
supplierList
.
map
(
item
=>
(
<
Option
value=
{
item
.
id
}
>
{
item
.
name
}
</
Option
>
<
Option
value=
{
item
.
id
}
key=
{
item
.
id
}
>
{
item
.
name
}
</
Option
>
))
}
</
Select
>
),
...
...
@@ -167,7 +169,7 @@ const TableList = () => {
columns=
{
columns
}
params=
{
{
shopId
}
}
request=
{
res
=>
query
(
res
)
}
rowKey=
"id"
rowKey=
{
r
=>
r
.
shopId
}
bordered
scroll=
{
{
x
:
1500
}
}
toolBarRender=
{
()
=>
[
...
...
src/pages/orderManage/batchDelivery/index.jsx
View file @
da4c606a
...
...
@@ -9,8 +9,8 @@ import {
downUploadeOrder
,
}
from
'
../pendingDeliveryOrder/service
'
;
const
TableList
=
()
=>
{
const
actionRef
=
useRef
();
const
TableList
=
ref
=>
{
const
actionRef
=
useRef
(
null
);
const
columns
=
[
{
title
:
'
批次号
'
,
...
...
src/pages/reconciliation/index.jsx
View file @
da4c606a
...
...
@@ -2,7 +2,7 @@ import { Button, Select } from 'antd';
import
React
,
{
useRef
,
useEffect
,
useState
}
from
'
react
'
;
import
{
PageHeaderWrapper
}
from
'
@ant-design/pro-layout
'
;
import
ProTable
from
'
@ant-design/pro-table
'
;
import
Link
from
'
umi/link
'
;
import
{
Link
}
from
'
umi
'
;
import
styles
from
'
./index.less
'
;
import
{
query
,
supplier
,
downDetail
}
from
'
./services
'
;
...
...
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