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
879b10e6
Commit
879b10e6
authored
Apr 18, 2023
by
陈万宝
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修改回显数据问题
parent
da0bdbcd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
FormInformationBasic.jsx
src/pages/ServiceGoods/components/FormInformationBasic.jsx
+7
-1
FormTakeaway.jsx
src/pages/ServiceGoods/components/FormTakeaway.jsx
+2
-2
No files found.
src/pages/ServiceGoods/components/FormInformationBasic.jsx
View file @
879b10e6
...
@@ -175,6 +175,12 @@ const FormInformationBasic = forwardRef((props, ref) => {
...
@@ -175,6 +175,12 @@ const FormInformationBasic = forwardRef((props, ref) => {
}
}
setIsEditTakeaway
(
true
);
setIsEditTakeaway
(
true
);
}
}
if
(
editData
?.
categoryId
?.
length
)
{
editData
.
categoryId
=
editData
.
categoryId
.
filter
(
item
=>
!!
item
);
}
if
(
editData
?.
storageRackIds
?.
length
)
{
editData
.
storageRackIds
=
editData
?.
storageRackIds
.
map
(
item
=>
`
${
item
}
`
);
}
form
.
setFieldsValue
(
editData
);
form
.
setFieldsValue
(
editData
);
if
(
editData
?.
commonImageList
?.
length
)
{
if
(
editData
?.
commonImageList
?.
length
)
{
onTakeawayImageList
(
editData
?.
commonImageList
);
onTakeawayImageList
(
editData
?.
commonImageList
);
...
@@ -190,7 +196,7 @@ const FormInformationBasic = forwardRef((props, ref) => {
...
@@ -190,7 +196,7 @@ const FormInformationBasic = forwardRef((props, ref) => {
}
}
const
temp
=
{
const
temp
=
{
productRefShopId
:
shopId
?
[
`
${
shopId
}
`
]
:
[],
productRefShopId
:
shopId
?
[
`
${
shopId
}
`
]
:
[],
storageRackIds
:
groupId
?
[
+
groupId
]
:
[],
storageRackIds
:
groupId
?
[
`
${
groupId
}
`
]
:
[],
};
};
form
.
setFieldsValue
(
temp
);
form
.
setFieldsValue
(
temp
);
},
[
groupShopData
]);
},
[
groupShopData
]);
...
...
src/pages/ServiceGoods/components/FormTakeaway.jsx
View file @
879b10e6
...
@@ -576,13 +576,13 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
...
@@ -576,13 +576,13 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
// 多规格
// 多规格
setRepertoryType('2');
setRepertoryType('2');
const specList = editData?.specList;
const specList = editData?.specList;
const weight = specList.filter(item => item.specGroupName === '份量');
const weight = specList.filter(item => item
?
.specGroupName === '份量');
const tempWeightName = JSON.parse(sessionStorage.getItem('weightUnits'));
const tempWeightName = JSON.parse(sessionStorage.getItem('weightUnits'));
if (weight?.length) {
if (weight?.length) {
weight.forEach(item => {
weight.forEach(item => {
if (item?.specs?.length) {
if (item?.specs?.length) {
item.specs.forEach(itm => {
item.specs.forEach(itm => {
if (itm?.unit && tempWeightName.includes(itm?.unit)) {
if (itm?.unit && tempWeightName
?
.includes(itm?.unit)) {
itm.quantity =
itm.quantity =
itm?.quantity?.indexOf('约') > -1
itm?.quantity?.indexOf('约') > -1
? itm?.quantity.slice(1)
? itm?.quantity.slice(1)
...
...
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