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
248c427c
Commit
248c427c
authored
Feb 12, 2025
by
shida.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 为 POP 商品管理添加新增商品权限并更新相关页面
parent
52a39979
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
9 deletions
+18
-9
permission.config.js
config/permission.config.js
+3
-0
index.jsx
src/pages/PopGoodsManage/index.jsx
+4
-4
TaskTypeSelect.jsx
src/pages/ServiceGoods/components/TaskTypeSelect.jsx
+11
-5
No files found.
config/permission.config.js
View file @
248c427c
...
@@ -55,6 +55,9 @@ export const POP_BATCH_DELIVERY = {
...
@@ -55,6 +55,9 @@ export const POP_BATCH_DELIVERY = {
// POP商品管理-(应付审计的,没有实际用处)
// POP商品管理-(应付审计的,没有实际用处)
export
const
POP_GOOD_MANAGE
=
{
export
const
POP_GOOD_MANAGE
=
{
EDITABLE
:
'
0201021
'
,
// 新增/修改
EDITABLE
:
'
0201021
'
,
// 新增/修改
ADD_SERVICE_GOODS
:
'
0201031
'
,
// 新增服务商品
ADD_NORMAL_GOODS
:
'
0201041
'
,
// 新增实物商品
ADD_TAKEAWAY_GOODS
:
'
0201051
'
,
// 新增外卖商品
};
};
// 订单查询
// 订单查询
...
...
src/pages/PopGoodsManage/index.jsx
View file @
248c427c
...
@@ -27,7 +27,7 @@ import InfoAudit from './infoAudit';
...
@@ -27,7 +27,7 @@ import InfoAudit from './infoAudit';
import
DraftModal
from
'
./DraftModal
'
;
import
DraftModal
from
'
./DraftModal
'
;
import
Takeaway
from
'
./Takeaway
'
;
import
Takeaway
from
'
./Takeaway
'
;
import
{
GOOD_MANAGE
,
POP_GOOD_MANAGE
}
from
'
@/../config/permission.config
'
;
import
{
POP_GOOD_MANAGE
}
from
'
@/../config/permission.config
'
;
import
LocalStroage
from
'
@/utils/localStorage
'
;
import
LocalStroage
from
'
@/utils/localStorage
'
;
import
configApi
from
'
@/../config/env.config
'
;
import
configApi
from
'
@/../config/env.config
'
;
import
{
GoldCategory
}
from
'
@/config/app.config
'
;
import
{
GoldCategory
}
from
'
@/config/app.config
'
;
...
@@ -422,9 +422,9 @@ class popGoodsManage extends Component {
...
@@ -422,9 +422,9 @@ class popGoodsManage extends Component {
};
};
const
{
pageNo
,
pageSize
,
selectedRowKeys
}
=
this
.
state
;
const
{
pageNo
,
pageSize
,
selectedRowKeys
}
=
this
.
state
;
const
canAddService
=
permissions
[
GOOD_MANAGE
.
ADD_SERVICE_GOODS
];
const
canAddService
=
permissions
[
POP_
GOOD_MANAGE
.
ADD_SERVICE_GOODS
];
const
canAddNormal
=
permissions
[
GOOD_MANAGE
.
ADD_NORMAL_GOODS
];
const
canAddNormal
=
permissions
[
POP_
GOOD_MANAGE
.
ADD_NORMAL_GOODS
];
const
canAddTakeaway
=
permissions
[
GOOD_MANAGE
.
ADD_TAKEAWAY_GOODS
];
const
canAddTakeaway
=
permissions
[
POP_
GOOD_MANAGE
.
ADD_TAKEAWAY_GOODS
];
this
.
canEditable
=
permissions
[
POP_GOOD_MANAGE
.
EDITABLE
];
this
.
canEditable
=
permissions
[
POP_GOOD_MANAGE
.
EDITABLE
];
// console.log('serviceData', this.state.serviceData);
// console.log('serviceData', this.state.serviceData);
// console.log('shopList', this.shopList);
// console.log('shopList', this.shopList);
...
...
src/pages/ServiceGoods/components/TaskTypeSelect.jsx
View file @
248c427c
...
@@ -2,14 +2,20 @@ import React, { useContext } from 'react';
...
@@ -2,14 +2,20 @@ import React, { useContext } from 'react';
import
{
TaskList
}
from
'
../config
'
;
import
{
TaskList
}
from
'
../config
'
;
import
{
ServiceContext
}
from
'
../context
'
;
import
{
ServiceContext
}
from
'
../context
'
;
import
commonStyle
from
'
../common.less
'
;
import
commonStyle
from
'
../common.less
'
;
import
{
useLocation
}
from
'
react-router-dom
'
;
import
{
POP_GOOD_MANAGE
}
from
'
@/../config/permission.config
'
;
export
const
TaskTypeSelect
=
props
=>
{
export
const
TaskTypeSelect
=
props
=>
{
const
location
=
useLocation
();
const
customer
=
useContext
(
ServiceContext
);
const
customer
=
useContext
(
ServiceContext
);
const
typeConfig
=
TaskList
(
const
isPopGoods
=
location
.
pathname
.
indexOf
(
'
popGoodsManage
'
)
>
0
;
// pop商品管理-商品库(应付审计用的, 驳回和修改状态下不能编辑)
customer
.
canAddService
,
const
typeConfig
=
!
isPopGoods
customer
.
canAddNormal
,
?
TaskList
(
customer
.
canAddService
,
customer
.
canAddNormal
,
customer
.
canTakeawayService
)
customer
.
canTakeawayService
,
:
TaskList
(
);
POP_GOOD_MANAGE
.
ADD_SERVICE_GOODS
===
'
0201031
'
,
POP_GOOD_MANAGE
.
ADD_NORMAL_GOODS
===
'
0201041
'
,
POP_GOOD_MANAGE
.
ADD_TAKEAWAY_GOODS
===
'
0201051
'
,
);
const
selectTabs
=
task
=>
{
const
selectTabs
=
task
=>
{
if
(
!
customer
.
isEdit
&&
Object
.
keys
(
props
.
takeAway
).
length
===
0
)
{
if
(
!
customer
.
isEdit
&&
Object
.
keys
(
props
.
takeAway
).
length
===
0
)
{
props
.
onChange
(
task
);
props
.
onChange
(
task
);
...
...
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