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
28cf37c8
Commit
28cf37c8
authored
Apr 01, 2023
by
baxibaba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修改商品逻辑
parent
12a59224
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
150 additions
and
181 deletions
+150
-181
FormTakeaway.jsx
src/pages/ServiceGoods/components/FormTakeaway.jsx
+133
-172
index.jsx
src/pages/ServiceGoods/index.jsx
+17
-9
No files found.
src/pages/ServiceGoods/components/FormTakeaway.jsx
View file @
28cf37c8
This diff is collapsed.
Click to expand it.
src/pages/ServiceGoods/index.jsx
View file @
28cf37c8
...
@@ -69,7 +69,7 @@ const ServiceGoods = options => {
...
@@ -69,7 +69,7 @@ const ServiceGoods = options => {
const
[
editData
,
setEditData
]
=
useState
({});
// 编辑保存数据
const
[
editData
,
setEditData
]
=
useState
({});
// 编辑保存数据
const
[
newCategoryList
,
setNewCategoryList
]
=
useState
({});
const
[
newCategoryList
,
setNewCategoryList
]
=
useState
({});
const
[
takeawayEditData
,
setTakeawayEditData
]
=
useState
({});
// 外卖编辑保存数据
const
[
takeawayEditData
,
setTakeawayEditData
]
=
useState
({});
// 外卖编辑保存数据
const
[
groupShopData
,
setGroupShopData
]
=
useState
(
''
)
// 从分组进入创建
const
[
groupShopData
,
setGroupShopData
]
=
useState
(
''
)
;
// 从分组进入创建
const
[
visibleCacheEdit
,
setVisibleCacheEdit
]
=
useState
(
false
);
// 显示有缓存未保存提示
const
[
visibleCacheEdit
,
setVisibleCacheEdit
]
=
useState
(
false
);
// 显示有缓存未保存提示
const
[
checkFormList
]
=
useState
([
const
[
checkFormList
]
=
useState
([
basicRef
,
basicRef
,
...
@@ -247,6 +247,7 @@ const ServiceGoods = options => {
...
@@ -247,6 +247,7 @@ const ServiceGoods = options => {
},
{});
},
{});
const
sendData
=
filterSendData
(
productType
,
params
);
const
sendData
=
filterSendData
(
productType
,
params
);
if
(
productType
===
5
)
{
if
(
productType
===
5
)
{
console
.
log
(
sendData
,
'
sendData
'
);
sendMerchantProductHttpRequest
(
sendData
);
sendMerchantProductHttpRequest
(
sendData
);
return
false
;
return
false
;
}
}
...
@@ -371,12 +372,12 @@ const ServiceGoods = options => {
...
@@ -371,12 +372,12 @@ const ServiceGoods = options => {
console
.
log
(
'
takeAway
'
,
takeAway
);
console
.
log
(
'
takeAway
'
,
takeAway
);
// 外卖类型
// 外卖类型
if
(
Object
.
keys
(
takeAway
).
length
)
{
if
(
Object
.
keys
(
takeAway
).
length
)
{
const
{
spuId
=
''
,
groupId
=
''
}
=
takeAway
const
{
spuId
=
''
,
groupId
=
''
}
=
takeAway
;
if
(
spuId
)
{
if
(
spuId
)
{
querGetShopDetail
(
takeAway
);
querGetShopDetail
(
takeAway
);
}
}
if
(
groupId
)
{
if
(
groupId
)
{
setGroupShopData
(
takeAway
)
setGroupShopData
(
takeAway
)
;
}
}
setProductType
(
5
);
setProductType
(
5
);
}
}
...
@@ -487,9 +488,13 @@ const ServiceGoods = options => {
...
@@ -487,9 +488,13 @@ const ServiceGoods = options => {
maskClosable=
{
false
}
maskClosable=
{
false
}
keyboard=
{
false
}
keyboard=
{
false
}
footer=
{
[
footer=
{
[
productType
===
5
?
''
:
<
Button
key=
"draft"
type=
"primary"
ghost
loading=
{
pageLoading
}
onClick=
{
onSaveDraft
}
>
productType
===
5
?
(
''
)
:
(
<
Button
key=
"draft"
type=
"primary"
ghost
loading=
{
pageLoading
}
onClick=
{
onSaveDraft
}
>
保存草稿
保存草稿
</
Button
>,
</
Button
>
),
<
Button
key=
"submit"
type=
"primary"
loading=
{
pageLoading
}
onClick=
{
submitEvent
}
>
<
Button
key=
"submit"
type=
"primary"
loading=
{
pageLoading
}
onClick=
{
submitEvent
}
>
提交
提交
</
Button
>,
</
Button
>,
...
@@ -510,7 +515,11 @@ const ServiceGoods = options => {
...
@@ -510,7 +515,11 @@ const ServiceGoods = options => {
)
}
)
}
<
ServiceContext
.
Provider
value=
{
providerValue
}
>
<
ServiceContext
.
Provider
value=
{
providerValue
}
>
<
Title
title=
"商品类型"
/>
<
Title
title=
"商品类型"
/>
<
TaskTypeSelect
productType=
{
productType
}
takeAway=
{
takeAway
}
onChange=
{
productChange
}
/>
<
TaskTypeSelect
productType=
{
productType
}
takeAway=
{
takeAway
}
onChange=
{
productChange
}
/>
<
Title
title=
"商品基本信息编辑"
/>
<
Title
title=
"商品基本信息编辑"
/>
<
FormInformationBasic
<
FormInformationBasic
...
@@ -589,7 +598,6 @@ const ServiceGoods = options => {
...
@@ -589,7 +598,6 @@ const ServiceGoods = options => {
ref=
{
takeawayRef
}
ref=
{
takeawayRef
}
takeAway=
{
takeAway
}
takeAway=
{
takeAway
}
editData=
{
takeawayEditData
}
editData=
{
takeawayEditData
}
infoMation=
{
editData
.
infoMation
}
supplierIdList=
{
supplierIdList
}
supplierIdList=
{
supplierIdList
}
onValuesChange=
{
onValuesChange
}
onValuesChange=
{
onValuesChange
}
/>
/>
...
...
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