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
71729977
Commit
71729977
authored
Jun 16, 2023
by
张子雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修改校验
parent
7e3a9251
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
index.jsx
src/pages/StoreManagement/editRepastModal/index.jsx
+15
-8
No files found.
src/pages/StoreManagement/editRepastModal/index.jsx
View file @
71729977
...
@@ -13,8 +13,7 @@ const EditRepastModal = props => {
...
@@ -13,8 +13,7 @@ const EditRepastModal = props => {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
selectMealType
.
length
)
{
if
(
selectMealType
.
length
)
{
let
mealTypeList
=
selectMealType
.
filter
(
item
=>
item
!==
4
);
let
mealTypeList
=
selectMealType
.
filter
(
item
=>
item
!==
4
);
mealTypeList
=
mealTypeList
.
length
&&
Number
(
mealTypeList
.
join
(
'
,
'
));
mealTypeList
=
(
mealTypeList
.
length
&&
Number
(
mealTypeList
.
join
(
'
,
'
)))
||
''
;
console
.
log
(
mealTypeList
);
const
store
=
selectMealType
.
includes
(
4
)
?
[
4
]
:
[];
const
store
=
selectMealType
.
includes
(
4
)
?
[
4
]
:
[];
form
.
setFieldsValue
({
mealTypeList
,
store
});
form
.
setFieldsValue
({
mealTypeList
,
store
});
}
}
...
@@ -22,7 +21,12 @@ const EditRepastModal = props => {
...
@@ -22,7 +21,12 @@ const EditRepastModal = props => {
const
onOk
=
()
=>
{
const
onOk
=
()
=>
{
form
.
validateFields
().
then
(
async
values
=>
{
form
.
validateFields
().
then
(
async
values
=>
{
const
store
=
values
?.
store
||
''
;
const
store
=
values
?.
store
||
''
;
const
mealTypeList
=
[
values
.
mealTypeList
,
...
store
];
let
mealTypeList
=
[];
if
(
values
?.
mealTypeList
)
{
mealTypeList
=
[
values
?.
mealTypeList
];
}
mealTypeList
=
[...
store
];
const
params
=
{
const
params
=
{
id
,
id
,
mealTypeList
,
mealTypeList
,
...
@@ -51,15 +55,18 @@ const EditRepastModal = props => {
...
@@ -51,15 +55,18 @@ const EditRepastModal = props => {
>
>
<
Radio
.
Group
>
<
Radio
.
Group
>
<
Space
direction=
"vertical"
>
<
Space
direction=
"vertical"
>
{
repastType
.
map
(
item
=>
(
{
(
repastType
.
length
&&
repastType
.
map
(
item
=>
(
<
Radio
value=
{
item
.
value
}
key=
{
item
.
value
}
>
<
Radio
value=
{
item
.
value
}
key=
{
item
.
value
}
>
{
item
.
label
}
{
item
.
label
}
</
Radio
>
</
Radio
>
))
}
)))
||
''
}
</
Space
>
</
Space
>
<
p
className=
{
styles
.
tip
}
>
切换餐品类型后,请及时维护商品
</
p
>
<
p
className=
{
styles
.
tip
}
>
切换餐品类型后,请及时维护商品
</
p
>
</
Radio
.
Group
>
</
Radio
.
Group
>
</
Form
.
Item
>
</
Form
.
Item
>
{
isStore
&&
(
{
isStore
&&
(
<
Form
.
Item
label=
"是否开启餐品类型"
name=
"store"
>
<
Form
.
Item
label=
"是否开启餐品类型"
name=
"store"
>
<
Checkbox
.
Group
>
<
Checkbox
.
Group
>
...
...
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