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
a7bdf2f4
Commit
a7bdf2f4
authored
Jun 14, 2023
by
武广
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 虚拟商品校验
parent
2400a604
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
8 deletions
+28
-8
CustomerInfo.jsx
src/pages/businessCustomer/components/CustomerInfo.jsx
+0
-1
virtualGoodsInfo.jsx
src/pages/businessGoods/virtualGoodsInfo.jsx
+28
-7
No files found.
src/pages/businessCustomer/components/CustomerInfo.jsx
View file @
a7bdf2f4
...
@@ -246,7 +246,6 @@ const CustomerInfo = props => {
...
@@ -246,7 +246,6 @@ const CustomerInfo = props => {
obj
.
hideInfo
.
push
(
'
hideImage
'
);
obj
.
hideInfo
.
push
(
'
hideImage
'
);
}
}
obj
.
mealType
=
res
.
data
.
mealType
.
map
(
item
=>
`
${
item
}
`
);
obj
.
mealType
=
res
.
data
.
mealType
.
map
(
item
=>
`
${
item
}
`
);
console
.
log
(
'
obj :>>
'
,
obj
);
setMealTypes
(
obj
.
mealType
);
setMealTypes
(
obj
.
mealType
);
const
json
=
{};
const
json
=
{};
res
.
data
.
mealTimePeriod
.
forEach
(
item
=>
{
res
.
data
.
mealTimePeriod
.
forEach
(
item
=>
{
...
...
src/pages/businessGoods/virtualGoodsInfo.jsx
View file @
a7bdf2f4
...
@@ -46,13 +46,34 @@ const VirtualGoodsInfo = props => {
...
@@ -46,13 +46,34 @@ const VirtualGoodsInfo = props => {
message
.
error
(
'
请添加商品
'
);
message
.
error
(
'
请添加商品
'
);
return
;
return
;
}
}
const
skuInfoList
=
dataSource
.
map
(
item
=>
({
const
skuInfoList
=
[];
skuId
:
item
.
skuId
,
try
{
enterprisePrice
:
item
.
enterprisePrice
,
dataSource
.
forEach
(
item
=>
{
mealTypeList
:
item
.
mealTypeList
.
map
(
m
=>
m
.
code
),
if
(
!
item
.
mealTypeList
||
item
.
mealTypeList
.
length
<
1
)
{
saleDateList
:
item
.
saleDate
,
throw
Error
(
'
请添加餐品类型!
'
);
tabCateList
:
item
.
tabCate
.
map
(
t
=>
({
tabId
:
t
})),
}
}));
if
(
!
item
.
enterprisePrice
||
item
.
enterprisePrice
.
length
<
1
)
{
throw
Error
(
'
请添加企业价格!
'
);
}
if
(
!
item
.
saleDate
||
item
.
saleDate
.
length
<
1
)
{
throw
Error
(
'
请添加可售日期!
'
);
}
if
(
!
item
.
tabCate
||
item
.
tabCate
.
length
<
1
)
{
throw
Error
(
'
请添加可售餐段!
'
);
}
const
json
=
{
skuId
:
item
.
skuId
,
enterprisePrice
:
item
.
enterprisePrice
,
mealTypeList
:
item
.
mealTypeList
.
map
(
m
=>
m
.
code
),
saleDateList
:
item
.
saleDate
,
tabCateList
:
item
.
tabCate
.
map
(
t
=>
({
tabId
:
t
})),
};
skuInfoList
.
push
(
json
);
});
}
catch
(
e
)
{
message
.
error
(
e
.
message
);
return
;
}
const
params
=
{
const
params
=
{
enterpriseId
:
id
,
enterpriseId
:
id
,
shopId
:
sleShopID
,
shopId
:
sleShopID
,
...
...
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