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
d9f92b1c
Commit
d9f92b1c
authored
Jun 20, 2023
by
武广
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改餐品类型
parent
f50d20a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
15 deletions
+6
-15
CustomerInfo.jsx
src/pages/businessCustomer/components/CustomerInfo.jsx
+6
-14
index.jsx
src/pages/businessCustomer/index.jsx
+0
-1
No files found.
src/pages/businessCustomer/components/CustomerInfo.jsx
View file @
d9f92b1c
...
...
@@ -164,25 +164,15 @@ const CustomerInfo = props => {
});
};
// 改变餐品类型 (
1和2要选都选 要不都不选
)
// 改变餐品类型 (
选自助餐必选外卖
)
const
onChangeMealType
=
async
ms
=>
{
try
{
if
(
props
.
info
&&
props
.
info
.
id
&&
ms
.
length
<
mealTypes
.
length
)
{
await
checkConfirm
();
}
if
(
mealTypes
.
length
>
ms
.
length
)
{
if
(
ms
.
includes
(
'
1
'
)
&&
ms
.
includes
(
'
2
'
))
{
ms
=
[
'
1
'
,
'
2
'
];
}
else
if
(
ms
.
includes
(
'
4
'
))
{
ms
=
[
'
4
'
];
}
else
{
ms
=
[];
}
}
else
if
(
ms
.
includes
(
'
1
'
)
||
ms
.
includes
(
'
2
'
))
{
if
(
ms
.
includes
(
'
4
'
))
{
ms
=
[
'
1
'
,
'
2
'
,
'
4
'
];
}
else
{
ms
=
[
'
1
'
,
'
2
'
];
if
(
mealTypes
.
length
<
ms
.
length
)
{
if
(
!
ms
.
includes
(
'
1
'
)
&&
ms
.
includes
(
'
2
'
))
{
ms
.
push
(
'
1
'
);
}
}
form
.
setFieldsValue
({
...
...
@@ -248,6 +238,8 @@ const CustomerInfo = props => {
}
if
(
res
.
data
.
mealType
)
{
obj
.
mealType
=
res
.
data
.
mealType
.
map
(
item
=>
`
${
item
}
`
);
}
else
{
obj
.
mealType
=
[];
}
setMealTypes
(
obj
.
mealType
);
const
json
=
{};
...
...
src/pages/businessCustomer/index.jsx
View file @
d9f92b1c
...
...
@@ -56,7 +56,6 @@ const BusinessCustomer = () => {
添加企业客户
</
Button
>,
]
}
scroll=
{
{
x
:
'
100%
'
,
y
:
400
}
}
/>
<
CustomerInfo
visible=
{
visible
}
...
...
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