Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
linweijiong
jinfa-platform
Commits
70c987ab
Commit
70c987ab
authored
Oct 13, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整路由
parent
408bd4ff
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
91 additions
and
33 deletions
+91
-33
commodityRoute.ts
config/routes/commodityRoute.ts
+75
-22
menu.ts
src/locales/zh-CN/menu.ts
+6
-1
index.tsx
src/pages/classAndProperty/attribute/index.tsx
+3
-3
index.tsx
src/pages/classAndProperty/propertyValue/index.tsx
+3
-3
index.tsx
src/pages/trademark/index.tsx
+3
-3
viewBrand.tsx
src/pages/trademark/viewBrand.tsx
+1
-1
No files found.
config/routes/commodityRoute.ts
View file @
70c987ab
...
...
@@ -4,51 +4,90 @@
* @Date: 2020-07-10 11:36:32
* @Last Modified by: ghua
* @Last Modified time: 2020-07-18 11:19:36
* @Description: 商品能力路由相关
*/
import
{
RouterChild
}
from
'../utils'
;
const
CommodityRoute
=
{
const
CommodityRoute
:
RouterChild
=
{
path
:
'/memberCenter/commodityAbility'
,
name
:
'commodityAbility'
,
key
:
'commodityAbility'
,
icon
:
'smile'
,
routes
:
[
// 品类及属性
{
path
:
'/memberCenter/commodityAbility/classAndProperty'
,
name
:
'classAndProperty'
,
key
:
'classAndProperty'
,
routes
:
[
// 品类
{
path
:
'/memberCenter/commodityAbility/classAndProperty/class'
,
name
:
'class'
,
icon
:
'smile'
,
component
:
'@/pages/classAndProperty/class'
,
},
// 属性
{
path
:
'/memberCenter/commodityAbility/classAndProperty/attribute'
,
name
:
'attribute'
,
icon
:
'smile'
,
component
:
'@/pages/classAndProperty/attribute'
,
},
// 属性-新增
{
path
:
'/memberCenter/commodityAbility/classAndProperty/attribute/add
Attribute
'
,
path
:
'/memberCenter/commodityAbility/classAndProperty/attribute/add'
,
name
:
'addAttribute'
,
icon
:
'smile'
,
component
:
'@/pages/classAndProperty/attribute/addAttribute'
,
hideInMenu
:
true
,
},
component
:
'@/pages/classAndProperty/attribute/addAttribute'
,
hideInMenu
:
true
,
},
// 属性-编辑
{
path
:
'/memberCenter/commodityAbility/classAndProperty/attribute/edit'
,
name
:
'editAttribute'
,
icon
:
'smile'
,
component
:
'@/pages/classAndProperty/attribute/addAttribute'
,
hideInMenu
:
true
,
},
// 属性-详情
{
path
:
'/memberCenter/commodityAbility/classAndProperty/attribute/detail'
,
name
:
'attributeDetail'
,
icon
:
'smile'
,
component
:
'@/pages/classAndProperty/attribute/addAttribute'
,
hideInMenu
:
true
,
},
// 属性值
{
path
:
'/memberCenter/commodityAbility/classAndProperty/propertyValue'
,
name
:
'propertyValue'
,
icon
:
'smile'
,
component
:
'@/pages/classAndProperty/propertyValue'
,
},
// 属性值-新增
{
path
:
'/memberCenter/commodityAbility/classAndProperty/propertyValue/add
PropertyValue
'
,
path
:
'/memberCenter/commodityAbility/classAndProperty/propertyValue/add'
,
name
:
'addPropertyValue'
,
icon
:
'smile'
,
component
:
'@/pages/classAndProperty/propertyValue/addPropertyValue'
,
hideInMenu
:
true
,
component
:
'@/pages/classAndProperty/propertyValue/addPropertyValue'
,
hideInMenu
:
true
,
},
// 属性值-编辑
{
path
:
'/memberCenter/commodityAbility/classAndProperty/propertyValue/edit'
,
name
:
'editPropertyValue'
,
icon
:
'smile'
,
component
:
'@/pages/classAndProperty/propertyValue/addPropertyValue'
,
hideInMenu
:
true
,
},
// 属性值-详情
{
path
:
'/memberCenter/commodityAbility/classAndProperty/propertyValue/detail'
,
name
:
'propertyValueDetail'
,
icon
:
'smile'
,
component
:
'@/pages/classAndProperty/propertyValue/addPropertyValue'
,
hideInMenu
:
true
,
},
// 关联品类属性
{
path
:
'/memberCenter/commodityAbility/classAndProperty/categoryAttributes'
,
name
:
'categoryAttributes'
,
...
...
@@ -63,34 +102,50 @@ const CommodityRoute = {
component
:
'@/pages/classAndProperty/categoryAttributes/viewAttributes'
,
},
]
},
},
// 品牌
{
path
:
'/memberCenter/commodityAbility/trademark'
,
name
:
'trademark'
,
// key: 'trademark',
icon
:
'smile'
,
component
:
'@/pages/trademark'
,
},
},
// 品牌-新增
{
path
:
'/memberCenter/commodityAbility/trademark/addBrand'
,
name
:
'addBrand'
,
key
:
'addBrand'
,
icon
:
'smile'
,
hideInMenu
:
true
,
component
:
'@/pages/trademark/addBrand'
,
},
},
// 品牌-新增
{
path
:
'/memberCenter/commodityAbility/trademark/viewBrand'
,
name
:
'viewBrand'
,
key
:
'viewBrand'
,
path
:
'/memberCenter/commodityAbility/trademark/add'
,
name
:
'addBrand'
,
icon
:
'smile'
,
hideInMenu
:
true
,
component
:
'@/pages/trademark/addBrand'
,
},
// 品牌-编辑
{
path
:
'/memberCenter/commodityAbility/trademark/edit'
,
name
:
'editBrand'
,
icon
:
'smile'
,
hideInMenu
:
true
,
component
:
'@/pages/trademark/addBrand'
,
},
// 品牌-查看
{
path
:
'/memberCenter/commodityAbility/trademark/detail'
,
name
:
'brandDetail'
,
hideInMenu
:
true
,
icon
:
'smile'
,
component
:
'@/pages/trademark/viewBrand'
,
},
},
// 商品
{
path
:
'/memberCenter/commodityAbility/commodity'
,
name
:
'commodity'
,
key
:
'commodity'
,
icon
:
'smile'
,
routes
:
[
{
...
...
@@ -172,7 +227,6 @@ const CommodityRoute = {
{
path
:
'/memberCenter/commodityAbility/repositories/addRepository'
,
name
:
'addRepository'
,
key
:
'addRepository'
,
icon
:
'smile'
,
hideInMenu
:
true
,
component
:
'./repositories/addRepository'
,
...
...
@@ -180,7 +234,6 @@ const CommodityRoute = {
{
path
:
'/memberCenter/commodityAbility/repositories/adjustRepository'
,
name
:
'adjustRepository'
,
key
:
'adjustRepository'
,
icon
:
'smile'
,
hideInMenu
:
true
,
component
:
'./repositories/adjustRepository'
,
...
...
src/locales/zh-CN/menu.ts
View file @
70c987ab
...
...
@@ -45,13 +45,18 @@ export default {
'menu.commodityAbility.classAndProperty.class'
:
'品类'
,
'menu.commodityAbility.classAndProperty.attribute'
:
'属性'
,
'menu.commodityAbility.classAndProperty.addAttribute'
:
'新建属性'
,
'menu.commodityAbility.classAndProperty.editAttribute'
:
'编辑属性'
,
'menu.commodityAbility.classAndProperty.attributeDetail'
:
'查看属性'
,
'menu.commodityAbility.classAndProperty.propertyValue'
:
'属性值'
,
'menu.commodityAbility.classAndProperty.addPropertyValue'
:
'新建属性值'
,
'menu.commodityAbility.classAndProperty.editPropertyValue'
:
'编辑属性值'
,
'menu.commodityAbility.classAndProperty.propertyValueDetail'
:
'查看属性值'
,
'menu.commodityAbility.classAndProperty.categoryAttributes'
:
'关联品类属性'
,
'menu.commodityAbility.classAndProperty.viewAttributes'
:
'品类属性'
,
'menu.commodityAbility.trademark'
:
'品牌'
,
'menu.commodityAbility.addBrand'
:
'新建品牌'
,
'menu.commodityAbility.viewBrand'
:
'品牌详情'
,
'menu.commodityAbility.editBrand'
:
'编辑品牌'
,
'menu.commodityAbility.brandDetail'
:
'查看品牌'
,
'menu.commodityAbility.commodity'
:
'商品'
,
'menu.commodityAbility.commodity.goods'
:
'货品'
,
'menu.commodityAbility.commodity.addGoods'
:
'新建货品'
,
...
...
src/pages/classAndProperty/attribute/index.tsx
View file @
70c987ab
...
...
@@ -96,7 +96,7 @@ const Attribute: React.FC<{}> = () => {
];
const
handleSee
=
(
record
:
any
)
=>
{
history
.
push
(
`/memberCenter/commodityAbility/classAndProperty/attribute/
addAttribute
?id=
${
record
.
id
}
&isSee=true`
)
history
.
push
(
`/memberCenter/commodityAbility/classAndProperty/attribute/
detail
?id=
${
record
.
id
}
&isSee=true`
)
}
const
confirm
=
(
record
:
any
)
=>
{
...
...
@@ -115,7 +115,7 @@ const Attribute: React.FC<{}> = () => {
}
const
handleEdit
=
(
record
:
any
)
=>
{
history
.
push
(
`/memberCenter/commodityAbility/classAndProperty/attribute/
addAttribute
?id=
${
record
.
id
}
`
)
history
.
push
(
`/memberCenter/commodityAbility/classAndProperty/attribute/
edit
?id=
${
record
.
id
}
`
)
}
const
cancel
=
()
=>
{
...
...
@@ -169,7 +169,7 @@ const Attribute: React.FC<{}> = () => {
},
children
:
(
<>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
{
history
.
push
(
'/memberCenter/commodityAbility/classAndProperty/attribute/add
Attribute
'
)
}
}
>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
{
history
.
push
(
'/memberCenter/commodityAbility/classAndProperty/attribute/add'
)
}
}
>
新建
</
Button
>
</>
...
...
src/pages/classAndProperty/propertyValue/index.tsx
View file @
70c987ab
...
...
@@ -95,7 +95,7 @@ const PropertyValue: React.FC<{}> = () => {
}
const
handleSee
=
(
record
:
any
)
=>
{
history
.
push
(
`/memberCenter/commodityAbility/classAndProperty/propertyValue/
addPropertyValue
?attrId=
${
selectKey
}
&attrName=
${
record
.
customerAttribute
.
name
}
&attrValueId=
${
record
.
id
}
&isSee=true&type=
${
record
.
type
}
`
)
history
.
push
(
`/memberCenter/commodityAbility/classAndProperty/propertyValue/
detail
?attrId=
${
selectKey
}
&attrName=
${
record
.
customerAttribute
.
name
}
&attrValueId=
${
record
.
id
}
&isSee=true&type=
${
record
.
type
}
`
)
}
const
columns
:
ColumnType
<
any
>
[]
=
[
...
...
@@ -148,7 +148,7 @@ const PropertyValue: React.FC<{}> = () => {
record
.
isEnable
?
''
:
<>
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/commodityAbility/classAndProperty/propertyValue/
addPropertyValue
?attrId=${selectKey}&attrName=${record.customerAttribute.name}&attrValueId=${record.id}`
)
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/commodityAbility/classAndProperty/propertyValue/
edit
?attrId=${selectKey}&attrName=${record.customerAttribute.name}&attrValueId=${record.id}`
)
}
>
编辑
</
Button
>
...
...
@@ -243,7 +243,7 @@ const PropertyValue: React.FC<{}> = () => {
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
{
history
.
push
(
`/memberCenter/commodityAbility/classAndProperty/propertyValue/add
PropertyValue
?attrId=${selectKey||history.location.query.attrId}&attrName=${selectNode?._title||history.location.query.attrName}&type=${selectNode?.type||history.location.query.type}`
)
history
.
push
(
`/memberCenter/commodityAbility/classAndProperty/propertyValue/add?attrId=${selectKey||history.location.query.attrId}&attrName=${selectNode?._title||history.location.query.attrName}&type=${selectNode?.type||history.location.query.type}`
)
}
}
>
新建
...
...
src/pages/trademark/index.tsx
View file @
70c987ab
...
...
@@ -106,7 +106,7 @@ const Trademark: React.FC<{}> = () => {
<
Dropdown
overlay=
{
<
Menu
>
<
Menu
.
Item
>
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/commodityAbility/trademark/
addBrand
?id=${record.id}`
)
}
>
修改
</
Button
>
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/commodityAbility/trademark/
edit
?id=${record.id}`
)
}
>
修改
</
Button
>
</
Menu
.
Item
>
<
Menu
.
Item
>
{
record
.
status
===
1
?
<
Button
type=
'link'
onClick=
{
()
=>
handleApplyCheck
(
record
)
}
>
提交审核
</
Button
>
:
''
}
...
...
@@ -127,7 +127,7 @@ const Trademark: React.FC<{}> = () => {
const
handleSee
=
(
record
:
any
)
=>
{
// console.log('see')
history
.
push
(
`/memberCenter/commodityAbility/trademark/
viewBrand
?id=
${
record
.
id
}
`
)
history
.
push
(
`/memberCenter/commodityAbility/trademark/
detail
?id=
${
record
.
id
}
`
)
}
const
confirm
=
(
record
:
any
)
=>
{
...
...
@@ -219,7 +219,7 @@ const Trademark: React.FC<{}> = () => {
},
children
:
(
<>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
history
.
push
(
'/memberCenter/commodityAbility/trademark/add
Brand
'
)
}
>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
history
.
push
(
'/memberCenter/commodityAbility/trademark/add'
)
}
>
新建
</
Button
>
</>
...
...
src/pages/trademark/viewBrand.tsx
View file @
70c987ab
...
...
@@ -150,7 +150,7 @@ const viewBrand: React.FC<{}> = () => {
icon=
{
<
FormOutlined
/>
}
key=
"1"
type=
"primary"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/commodityAbility/trademark/
addBrand
?id=${brandInfo.id}`
)
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/commodityAbility/trademark/
edit
?id=${brandInfo.id}`
)
}
disabled=
{
!
(
brandInfo
.
status
===
1
||
brandInfo
.
status
===
3
)
}
style=
{
{
display
:
!
(
brandInfo
.
status
===
1
||
brandInfo
.
status
===
3
)?
'none'
:
'block'
}
}
>
...
...
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