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
f50d20a4
Commit
f50d20a4
authored
Jun 20, 2023
by
武广
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改餐段、可售日期问题
parent
33d07729
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
4 deletions
+20
-4
SaleDateModal.jsx
src/pages/businessGoods/components/SaleDateModal.jsx
+7
-1
SaleSectionModal.jsx
src/pages/businessGoods/components/SaleSectionModal.jsx
+11
-3
virtualGoodsInfo.jsx
src/pages/businessGoods/virtualGoodsInfo.jsx
+2
-0
No files found.
src/pages/businessGoods/components/SaleDateModal.jsx
View file @
f50d20a4
...
...
@@ -36,7 +36,13 @@ const SaleDateModal = props => {
useEffect
(()
=>
{
if
(
props
.
visible
)
{
let
v
=
[];
const
dateList
=
props
.
item
?.
saleDateList
||
props
.
item
?.
saleDate
;
let
dateList
=
[];
if
(
props
.
item
)
{
if
(
props
.
type
)
{
dateList
=
props
.
item
[
props
.
type
];
}
dateList
=
dateList
||
props
.
item
.
saleDateList
||
props
.
item
.
saleDate
;
}
if
(
dateList
&&
dateList
.
length
)
{
v
=
dateList
.
map
(
item
=>
{
if
(
typeof
item
===
'
object
'
)
{
...
...
src/pages/businessGoods/components/SaleSectionModal.jsx
View file @
f50d20a4
...
...
@@ -41,14 +41,20 @@ const SaleDateModal = props => {
const
res
=
await
apiEnterpriseInfo
(
props
.
enterpriseID
);
setLoading
(
false
);
if
(
res
&&
res
.
data
&&
res
.
data
.
mealTimePeriod
&&
res
.
data
.
mealTimePeriod
.
length
)
{
setTabCateList
(
res
.
data
.
mealTimePeriod
.
map
(
item
=>
item
.
mealPeriodType
));
setTabCateList
(
res
.
data
.
mealTimePeriod
.
map
(
item
=>
`
${
item
.
mealPeriodType
}
`
));
}
};
useEffect
(()
=>
{
if
(
props
.
visible
)
{
let
v
=
[];
const
tabCate
=
props
.
item
.
tabCateList
||
props
.
item
.
tabCate
;
let
tabCate
=
[];
if
(
props
.
item
)
{
if
(
props
.
type
)
{
tabCate
=
props
.
item
[
props
.
type
];
}
tabCate
=
tabCate
||
props
.
item
.
tabCateList
||
props
.
item
.
tabCate
;
}
if
(
tabCate
&&
tabCate
.
length
)
{
v
=
tabCate
.
map
(
item
=>
{
if
(
typeof
item
===
'
object
'
)
{
...
...
@@ -58,7 +64,9 @@ const SaleDateModal = props => {
});
}
setValue
(
v
);
getEnterpriseMealColumn
();
if
(
props
.
enterpriseID
)
{
getEnterpriseMealColumn
();
}
}
},
[
props
.
visible
]);
...
...
src/pages/businessGoods/virtualGoodsInfo.jsx
View file @
f50d20a4
...
...
@@ -236,6 +236,7 @@ const VirtualGoodsInfo = props => {
<
SaleDateModal
visible=
{
visibleSaleDate
}
item=
{
editItem
}
type=
"saleDate"
handleRefresh=
{
v
=>
refreshList
(
'
saleDate
'
,
v
)
}
handleClose=
{
()
=>
setVisibleSaleDate
(
false
)
}
/>
...
...
@@ -245,6 +246,7 @@ const VirtualGoodsInfo = props => {
<
SaleSectionModal
visible=
{
visibleSaleSection
}
item=
{
editItem
}
type=
"tabCate"
enterpriseID=
{
id
}
handleRefresh=
{
v
=>
refreshList
(
'
tabCate
'
,
v
)
}
handleClose=
{
()
=>
setVisibleSaleSection
(
false
)
}
...
...
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