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
b313df37
Commit
b313df37
authored
Apr 11, 2023
by
陈万宝
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 更新数据
parent
1a2c0276
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
19 deletions
+20
-19
FormInformationBasic.jsx
src/pages/ServiceGoods/components/FormInformationBasic.jsx
+1
-1
FormTakeaway.jsx
src/pages/ServiceGoods/components/FormTakeaway.jsx
+17
-15
index.jsx
src/pages/ServiceGoods/index.jsx
+2
-3
No files found.
src/pages/ServiceGoods/components/FormInformationBasic.jsx
View file @
b313df37
...
...
@@ -167,7 +167,7 @@ const FormInformationBasic = forwardRef((props, ref) => {
useEffect
(()
=>
{
if
(
!
editData
)
return
;
if
(
editData
.
productType
===
5
&&
editData
?.
name
)
{
if
(
editData
?
.
productType
===
5
&&
editData
?.
name
)
{
shopGetByProductType
(
5
);
queryShopList
({
shopId
:
editData
?.
productRefShopId
});
setShopIdSource
(
editData
?.
productRefShopId
);
...
...
src/pages/ServiceGoods/components/FormTakeaway.jsx
View file @
b313df37
...
...
@@ -632,10 +632,11 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
let tempEdit = JSON.parse(JSON.stringify(editData));
tempEdit = Object.assign({}, editData, { ...tempEdit.takeawayItem });
console.log('tempEdit', tempEdit);
if (Object.keys(tempEdit).length) {
tempEdit.saleTimes = tempEdit?.saleTimes?.length
? tempEdit?.saleTimes?.map(item => [moment(item[0]), moment(item[1])])
: [];
if (tempEdit?.saleTimes && !(tempEdit?.weight)
) {
if (tempEdit?.saleTimes && !tempEdit?.weight
) {
setRepertoryType('1');
} else {
setRepertoryType('2');
...
...
@@ -648,7 +649,8 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
setTimeType(tempEdit?.saleTimeType);
}
form.setFieldsValue(tempEdit);
// getFormValues();
}
getFormValues();
}
}, [customer.isEdit, editData]);
useEffect(() => {
...
...
src/pages/ServiceGoods/index.jsx
View file @
b313df37
...
...
@@ -331,7 +331,7 @@ const ServiceGoods = options => {
setVisibleCacheEdit
(
false
);
setIsUseCache
(
true
);
const
info
=
localStorage
.
get
(
localAutoSaveKey
);
if
(
info
)
{
if
(
info
&&
info
.
type
!==
5
)
{
onSetData
(
info
);
}
};
...
...
@@ -383,7 +383,7 @@ const ServiceGoods = options => {
useEffect
(()
=>
{
if
(
options
.
visible
&&
!
isEdit
)
{
const
info
=
localStorage
.
get
(
localAutoSaveKey
);
if
(
info
)
{
if
(
info
&&
info
.
type
!==
5
)
{
setVisibleCacheEdit
(
true
);
return
;
}
...
...
@@ -403,7 +403,6 @@ const ServiceGoods = options => {
);
useEffect
(()
=>
{
// 外卖类型
console
.
log
(
'
takeAway
'
,
takeAway
);
if
(
Object
.
keys
(
takeAway
)?.
length
)
{
const
{
spuId
=
''
,
groupId
=
''
}
=
takeAway
;
if
(
spuId
)
{
...
...
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