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
3381b3bf
Commit
3381b3bf
authored
Jun 15, 2023
by
张子雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修复餐饮类型选择问题
parent
c2a43dab
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
16 deletions
+17
-16
newEmployeeModal.jsx
src/pages/EmployeeManagement/components/newEmployeeModal.jsx
+0
-1
data.js
src/pages/StoreManagement/data.js
+2
-2
index.jsx
src/pages/StoreManagement/editRepastModal/index.jsx
+15
-13
No files found.
src/pages/EmployeeManagement/components/newEmployeeModal.jsx
View file @
3381b3bf
...
...
@@ -40,7 +40,6 @@ const NewEmployeeModal = props => {
};
const
validatePhone
=
(
_
,
value
)
=>
{
console
.
log
(
value
);
const
phoneRegex
=
/^1
[
3456789
]\d{9}
$/
;
if
(
!
value
||
phoneRegex
.
test
(
value
))
{
return
Promise
.
resolve
();
...
...
src/pages/StoreManagement/data.js
View file @
3381b3bf
...
...
@@ -88,8 +88,8 @@ export const columns = props => [
},
{
title
:
'
修改时间
'
,
key
:
'
cre
atedAt
'
,
dataIndex
:
'
cre
atedAt
'
,
key
:
'
upd
atedAt
'
,
dataIndex
:
'
upd
atedAt
'
,
align
:
'
center
'
,
},
{
...
...
src/pages/StoreManagement/editRepastModal/index.jsx
View file @
3381b3bf
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
{
Modal
,
Radio
,
Form
,
Space
,
message
,
Checkbox
}
from
'
antd
'
;
import
styles
from
'
../index.less
'
;
import
{
apiShopUpdate
,
busineesTypeCheck
}
from
'
../service.js
'
;
import
{
apiShopUpdate
}
from
'
../service.js
'
;
const
EditRepastModal
=
props
=>
{
const
[
form
]
=
Form
.
useForm
();
...
...
@@ -12,25 +12,27 @@ const EditRepastModal = props => {
};
useEffect
(()
=>
{
if
(
selectMealType
.
length
)
{
const
mealTypeList
=
selectMealType
.
filter
(
item
=>
item
!==
4
);
let
mealTypeList
=
selectMealType
.
filter
(
item
=>
item
!==
4
);
mealTypeList
=
mealTypeList
.
length
&&
Number
(
mealTypeList
.
join
(
'
,
'
));
console
.
log
(
mealTypeList
);
const
store
=
selectMealType
.
includes
(
4
)
?
[
4
]
:
[];
form
.
setFieldsValue
({
mealTypeList
,
store
});
}
},
[
selectMealType
]);
const
onOk
=
()
=>
{
form
.
validateFields
().
then
(
async
values
=>
{
console
.
log
(
values
);
const
store
=
values
?.
store
||
''
;
const
mealTypeList
=
[
...
values
.
mealTypeList
,
...
store
];
const
mealTypeList
=
[
values
.
mealTypeList
,
...
store
];
const
params
=
{
id
,
mealTypeList
,
};
const
res
=
await
apiShopUpdate
(
params
);
if
(
res
.
businessCode
===
'
0000
'
)
{
message
.
success
(
'
修改成功
'
);
handleCancel
(
true
);
}
console
.
log
(
params
);
// const res = await apiShopUpdate(params);
// if (res.businessCode === '0000') {
// message.success('修改成功');
// handleCancel(true);
// }
});
};
...
...
@@ -48,16 +50,16 @@ const EditRepastModal = props => {
rules=
{
[{
required
:
true
,
message
:
'
请选择商户餐品类型
'
}]
}
name=
"mealTypeList"
>
<
Checkbox
.
Group
>
<
Radio
.
Group
>
<
Space
direction=
"vertical"
>
{
repastType
.
map
(
item
=>
(
<
Checkbox
value=
{
item
.
value
}
key=
{
item
.
value
}
>
<
Radio
value=
{
item
.
value
}
key=
{
item
.
value
}
>
{
item
.
label
}
</
Checkbox
>
</
Radio
>
))
}
</
Space
>
<
p
className=
{
styles
.
tip
}
>
切换餐品类型后,请及时维护商品
</
p
>
</
Checkbox
.
Group
>
</
Radio
.
Group
>
</
Form
.
Item
>
{
isStore
&&
(
<
Form
.
Item
label=
"是否开启餐品类型"
name=
"store"
>
...
...
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