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
黄庭坚
jinfa-platform
Commits
5c36b2d7
Commit
5c36b2d7
authored
Feb 16, 2022
by
xiexiuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复商品的
parent
ddb0d072
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
10 deletions
+30
-10
按钮状态.md
src/components/AuthButton/按钮状态.md
+9
-2
index.tsx
src/components/TableOperation/index.tsx
+18
-6
index.tsx
src/pages/commodity/products/index.tsx
+2
-2
index.tsx
src/pages/content/category/index.tsx
+1
-0
No files found.
src/components/AuthButton/按钮状态.md
View file @
5c36b2d7
# btn
Code 是pass 平台配置唯一表示
# btn
Code 是pass 平台配置唯一表示
...
@@ -22,7 +22,14 @@
...
@@ -22,7 +22,14 @@
products.add :'商品新曾'
products.add :'商品新曾'
products.batch:'商品批量操作'
products.batch:'商品批量操作'
products.copy:'商品拷贝'
products.copy:'商品拷贝'
products.examine:'提交审核'
products.edit:'编辑'
products.del:删除
products.state 商品上下架操作 商品上下架操作按钮
products.examine 商品审核操作 商品审核操作按钮
products.copy 商品复制操作 商品复制操作按钮
products.supply 查看供应商品操作 查看供应商品操作
-
2.1.快捷修改单价 (已完成)
-
2.1.快捷修改单价 (已完成)
fastModifyPrice.edit :'快捷修改单价'
fastModifyPrice.edit :'快捷修改单价'
fastModifyPrice.see:'快捷修改查看'
fastModifyPrice.see:'快捷修改查看'
...
...
src/components/TableOperation/index.tsx
View file @
5c36b2d7
...
@@ -2,6 +2,7 @@ import React from 'react'
...
@@ -2,6 +2,7 @@ import React from 'react'
import
{
Button
,
Dropdown
,
Menu
}
from
'antd'
import
{
Button
,
Dropdown
,
Menu
}
from
'antd'
import
{
CaretDownOutlined
}
from
'@ant-design/icons'
import
{
CaretDownOutlined
}
from
'@ant-design/icons'
import
{
getIntl
}
from
'umi'
;
import
{
getIntl
}
from
'umi'
;
import
AuthButton
from
'@/components/AuthButton'
const
intl
=
getIntl
();
const
intl
=
getIntl
();
...
@@ -27,27 +28,31 @@ export interface TableOperationProps {
...
@@ -27,27 +28,31 @@ export interface TableOperationProps {
}
}
const
TableOperation
:
React
.
FC
<
TableOperationProps
>
=
(
props
)
=>
{
const
TableOperation
:
React
.
FC
<
TableOperationProps
>
=
(
props
)
=>
{
const
{
buttonTextFieldMap
,
operationHandler
,
buttonPermissionsMap
=
null
,
menuCode
=
null
}
=
props
const
{
buttonTextFieldMap
,
operationHandler
,
buttonPermissionsMap
=
null
,
menuCode
=
null
}
=
props
const
keyNames
=
Object
.
keys
(
buttonTextFieldMap
)
const
keyNames
=
Object
.
keys
(
buttonTextFieldMap
)
return
(<>
return
(<>
{
{
Object
.
values
(
buttonTextFieldMap
).
filter
(
Boolean
).
length
>
2
Object
.
values
(
buttonTextFieldMap
).
filter
(
Boolean
).
length
>
2
?
?
<>
<>
<
AuthButton
btnCode=
{
buttonPermissionsMap
[
keyNames
[
0
]]
}
>
<
Button
type=
'link'
onClick=
{
operationHandler
[
keyNames
[
0
]]
}
>
{
keyNames
[
0
]
}
</
Button
>
<
Button
type=
'link'
onClick=
{
operationHandler
[
keyNames
[
0
]]
}
>
{
keyNames
[
0
]
}
</
Button
>
</
AuthButton
>
<
Dropdown
overlay=
{
<
Dropdown
overlay=
{
<
Menu
>
<
Menu
>
{
{
keyNames
.
slice
(
1
,
keyNames
.
length
).
map
((
item
,
i
)
=>
buttonTextFieldMap
[
item
]
?
(
keyNames
.
slice
(
1
,
keyNames
.
length
).
map
((
item
,
i
)
=>
buttonTextFieldMap
[
item
]
?
(
<
Menu
.
Item
key=
{
`menuItem${i}`
}
>
<
Menu
.
Item
key=
{
`menuItem${i}`
}
>
<
Button
type=
'link'
onClick=
{
operationHandler
[
item
]
}
>
{
item
}
</
Button
>
<
AuthButton
btnCode=
{
buttonPermissionsMap
[
item
]
}
>
<
Button
type=
'link'
onClick=
{
operationHandler
[
item
]
}
>
{
item
}
</
Button
>
</
AuthButton
>
</
Menu
.
Item
>
</
Menu
.
Item
>
)
:
null
)
)
:
null
)
}
}
...
@@ -58,8 +63,15 @@ const TableOperation: React.FC<TableOperationProps> = (props) => {
...
@@ -58,8 +63,15 @@ const TableOperation: React.FC<TableOperationProps> = (props) => {
</
a
>
</
a
>
</
Dropdown
>
</
Dropdown
>
</>
</>
:
:
keyNames
.
map
((
item
,
i
)
=>
(
buttonTextFieldMap
[
item
]
?
<
Button
key=
{
`btnItem${i}`
}
type=
'link'
onClick=
{
operationHandler
[
item
]
}
>
{
item
}
</
Button
>
:
null
))
keyNames
.
map
((
item
,
i
)
=>
(
buttonTextFieldMap
[
item
]
?
// <div>
{
buttonPermissionsMap
[
item
]}<
/
div
>
<
AuthButton
btnCode=
{
buttonPermissionsMap
[
item
]
}
>
<
Button
key=
{
`btnItem${i}`
}
type=
'link'
onClick=
{
operationHandler
[
item
]
}
>
{
item
}
</
Button
>
</
AuthButton
>
: null))
}
}
</>)
</>)
}
}
...
...
src/pages/commodity/products/index.tsx
View file @
5c36b2d7
...
@@ -193,8 +193,8 @@ const Products: React.FC<{}> = () => {
...
@@ -193,8 +193,8 @@ const Products: React.FC<{}> = () => {
[
intl
.
formatMessage
({
id
:
'commodity.products.buttonGroup.2'
})]:
'products.examine'
,
[
intl
.
formatMessage
({
id
:
'commodity.products.buttonGroup.2'
})]:
'products.examine'
,
[
intl
.
formatMessage
({
id
:
'commodity.products.buttonGroup.3'
})]:
'products.edit'
,
[
intl
.
formatMessage
({
id
:
'commodity.products.buttonGroup.3'
})]:
'products.edit'
,
[
intl
.
formatMessage
({
id
:
'commodity.products.buttonGroup.4'
})]:
'products.del'
,
[
intl
.
formatMessage
({
id
:
'commodity.products.buttonGroup.4'
})]:
'products.del'
,
[
intl
.
formatMessage
({
id
:
'commodity.products.buttonGroup.5'
})]:
'products.
putaway
'
,
[
intl
.
formatMessage
({
id
:
'commodity.products.buttonGroup.5'
})]:
'products.
state
'
,
[
intl
.
formatMessage
({
id
:
'commodity.products.buttonGroup.6'
})]:
'products.
pulloff
'
,
[
intl
.
formatMessage
({
id
:
'commodity.products.buttonGroup.6'
})]:
'products.
state
'
,
[
intl
.
formatMessage
({
id
:
'commodity.products.buttonGroup.7'
})]:
'products.supply'
,
[
intl
.
formatMessage
({
id
:
'commodity.products.buttonGroup.7'
})]:
'products.supply'
,
}
}
...
...
src/pages/content/category/index.tsx
View file @
5c36b2d7
...
@@ -150,6 +150,7 @@ const ClassProperty: React.FC<{}> = () => {
...
@@ -150,6 +150,7 @@ const ClassProperty: React.FC<{}> = () => {
const
clickSelect
=
(
key
,
node
)
=>
{
const
clickSelect
=
(
key
,
node
)
=>
{
handleSelect
(
key
,
node
)
handleSelect
(
key
,
node
)
// flag = false
// flag = false
}
}
useEffect
(()
=>
{
useEffect
(()
=>
{
...
...
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