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
87caf0b5
Commit
87caf0b5
authored
Feb 12, 2025
by
shida.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 权限
parent
248c427c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
TaskTypeSelect.jsx
src/pages/ServiceGoods/components/TaskTypeSelect.jsx
+4
-3
index.jsx
src/pages/ServiceGoods/index.jsx
+1
-0
No files found.
src/pages/ServiceGoods/components/TaskTypeSelect.jsx
View file @
87caf0b5
...
@@ -6,15 +6,16 @@ import { useLocation } from 'react-router-dom';
...
@@ -6,15 +6,16 @@ import { useLocation } from 'react-router-dom';
import
{
POP_GOOD_MANAGE
}
from
'
@/../config/permission.config
'
;
import
{
POP_GOOD_MANAGE
}
from
'
@/../config/permission.config
'
;
export
const
TaskTypeSelect
=
props
=>
{
export
const
TaskTypeSelect
=
props
=>
{
const
{
permissions
}
=
props
;
const
location
=
useLocation
();
const
location
=
useLocation
();
const
customer
=
useContext
(
ServiceContext
);
const
customer
=
useContext
(
ServiceContext
);
const
isPopGoods
=
location
.
pathname
.
indexOf
(
'
popGoodsManage
'
)
>
0
;
// pop商品管理-商品库(应付审计用的, 驳回和修改状态下不能编辑)
const
isPopGoods
=
location
.
pathname
.
indexOf
(
'
popGoodsManage
'
)
>
0
;
// pop商品管理-商品库(应付审计用的, 驳回和修改状态下不能编辑)
const
typeConfig
=
!
isPopGoods
const
typeConfig
=
!
isPopGoods
?
TaskList
(
customer
.
canAddService
,
customer
.
canAddNormal
,
customer
.
canTakeawayService
)
?
TaskList
(
customer
.
canAddService
,
customer
.
canAddNormal
,
customer
.
canTakeawayService
)
:
TaskList
(
:
TaskList
(
POP_GOOD_MANAGE
.
ADD_SERVICE_GOODS
===
'
0201031
'
,
permissions
[
POP_GOOD_MANAGE
.
ADD_SERVICE_GOODS
]
,
POP_GOOD_MANAGE
.
ADD_NORMAL_GOODS
===
'
0201041
'
,
permissions
[
POP_GOOD_MANAGE
.
ADD_NORMAL_GOODS
]
,
POP_GOOD_MANAGE
.
ADD_TAKEAWAY_GOODS
===
'
0201051
'
,
permissions
[
POP_GOOD_MANAGE
.
ADD_TAKEAWAY_GOODS
]
,
);
);
const
selectTabs
=
task
=>
{
const
selectTabs
=
task
=>
{
if
(
!
customer
.
isEdit
&&
Object
.
keys
(
props
.
takeAway
).
length
===
0
)
{
if
(
!
customer
.
isEdit
&&
Object
.
keys
(
props
.
takeAway
).
length
===
0
)
{
...
...
src/pages/ServiceGoods/index.jsx
View file @
87caf0b5
...
@@ -564,6 +564,7 @@ const ServiceGoods = options => {
...
@@ -564,6 +564,7 @@ const ServiceGoods = options => {
<
ServiceContext
.
Provider
value=
{
providerValue
}
>
<
ServiceContext
.
Provider
value=
{
providerValue
}
>
<
Title
title=
"商品类型"
/>
<
Title
title=
"商品类型"
/>
<
TaskTypeSelect
<
TaskTypeSelect
permissions=
{
permissions
}
productType=
{
productType
}
productType=
{
productType
}
takeAway=
{
takeAway
}
takeAway=
{
takeAway
}
onChange=
{
productChange
}
onChange=
{
productChange
}
...
...
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