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
6db69753
Commit
6db69753
authored
Mar 29, 2023
by
陈万宝
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 更新多规格
parent
ae61a64f
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
144 additions
and
91 deletions
+144
-91
index.jsx
src/pages/GoodsManage/index.jsx
+2
-2
FormInformationBasic.jsx
src/pages/ServiceGoods/components/FormInformationBasic.jsx
+5
-3
FormTakeaway.jsx
src/pages/ServiceGoods/components/FormTakeaway.jsx
+135
-85
index.jsx
src/pages/ServiceGoods/index.jsx
+2
-1
No files found.
src/pages/GoodsManage/index.jsx
View file @
6db69753
...
@@ -62,7 +62,7 @@ class goodsManage extends Component {
...
@@ -62,7 +62,7 @@ class goodsManage extends Component {
auditRow
:
{},
// 查看审核信息使用
auditRow
:
{},
// 查看审核信息使用
isVisibleDraft
:
false
,
// 显示隐藏草稿箱
isVisibleDraft
:
false
,
// 显示隐藏草稿箱
isEditDraft
:
false
,
// 是否编辑草稿
isEditDraft
:
false
,
// 是否编辑草稿
productType
:
1
,
// 商品类型
productType
:
5
,
// 商品类型
takeAway
:
{},
// 弹窗外卖商品参数
takeAway
:
{},
// 弹窗外卖商品参数
searchValue
:
{},
// 搜索条件
searchValue
:
{},
// 搜索条件
refresh
:
''
,
// 外卖刷新
refresh
:
''
,
// 外卖刷新
...
@@ -78,7 +78,7 @@ class goodsManage extends Component {
...
@@ -78,7 +78,7 @@ class goodsManage extends Component {
componentDidMount
()
{
componentDidMount
()
{
this
.
props
.
goodsManage
.
tableData
=
{};
this
.
props
.
goodsManage
.
tableData
=
{};
this
.
categoryList
();
this
.
categoryList
(
this
.
state
.
productType
);
this
.
categoryListByType
(
this
.
state
.
productType
);
this
.
categoryListByType
(
this
.
state
.
productType
);
this
.
getVirtualCategory
();
this
.
getVirtualCategory
();
this
.
specList
();
this
.
specList
();
...
...
src/pages/ServiceGoods/components/FormInformationBasic.jsx
View file @
6db69753
...
@@ -12,7 +12,7 @@ import { ServiceContext } from '../context';
...
@@ -12,7 +12,7 @@ import { ServiceContext } from '../context';
import
{
debounce
}
from
'
@/utils/utils
'
;
import
{
debounce
}
from
'
@/utils/utils
'
;
import
AddMenusModal
from
'
./AddMenusModal
'
;
import
AddMenusModal
from
'
./AddMenusModal
'
;
import
UploadImage
from
'
./UploadImage
'
;
import
UploadImage
from
'
./UploadImage
'
;
import
{
apiShopIds
,
apiQueryShopList
}
from
'
../service
'
;
import
{
apiShopIds
,
apiQueryShopList
,
getByProductType
}
from
'
../service
'
;
const
CreateSelectOption
=
optionList
=>
const
CreateSelectOption
=
optionList
=>
optionList
.
map
(
brandItem
=>
(
optionList
.
map
(
brandItem
=>
(
...
@@ -34,6 +34,7 @@ const FormInformationBasic = forwardRef((props, ref) => {
...
@@ -34,6 +34,7 @@ const FormInformationBasic = forwardRef((props, ref) => {
brandList
,
brandList
,
afterAddressList
,
afterAddressList
,
specListData
,
specListData
,
shopGetByProductType
,
}
=
props
;
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
const
[
noreBrandList
,
setNoreBrandList
]
=
useState
([]);
const
[
noreBrandList
,
setNoreBrandList
]
=
useState
([]);
...
@@ -66,6 +67,7 @@ const FormInformationBasic = forwardRef((props, ref) => {
...
@@ -66,6 +67,7 @@ const FormInformationBasic = forwardRef((props, ref) => {
return
null
;
return
null
;
}
}
};
};
// 自定义加入菜单
// 自定义加入菜单
const
showModal
=
()
=>
{
const
showModal
=
()
=>
{
childAddMenusModalRef
.
current
.
setOpen
(
true
);
childAddMenusModalRef
.
current
.
setOpen
(
true
);
...
@@ -136,9 +138,9 @@ const FormInformationBasic = forwardRef((props, ref) => {
...
@@ -136,9 +138,9 @@ const FormInformationBasic = forwardRef((props, ref) => {
},
[
brandList
]);
},
[
brandList
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
console
.
log
(
'
商品类目
'
,
newCategoryList
[
customer
.
productType
]);
if
(
!
editData
)
return
;
if
(
!
editData
)
return
;
if
(
editData
.
productType
===
5
&&
editData
.
name
)
{
if
(
editData
.
productType
===
5
&&
editData
.
name
)
{
shopGetByProductType
(
5
);
queryShopList
({
shopId
:
editData
.
productRefShopId
});
queryShopList
({
shopId
:
editData
.
productRefShopId
});
setIsEditTakeaway
(
true
);
setIsEditTakeaway
(
true
);
}
}
...
@@ -156,7 +158,7 @@ const FormInformationBasic = forwardRef((props, ref) => {
...
@@ -156,7 +158,7 @@ const FormInformationBasic = forwardRef((props, ref) => {
name
:
''
,
name
:
''
,
categoryId
:
[],
categoryId
:
[],
description
:
''
,
description
:
''
,
productRefShopId
:
[
15
],
productRefShopId
:
[],
storageRackIds
:
[],
storageRackIds
:
[],
}
}
}
}
scrollToFirstError
scrollToFirstError
...
...
src/pages/ServiceGoods/components/FormTakeaway.jsx
View file @
6db69753
This diff is collapsed.
Click to expand it.
src/pages/ServiceGoods/index.jsx
View file @
6db69753
...
@@ -86,7 +86,7 @@ const ServiceGoods = options => {
...
@@ -86,7 +86,7 @@ const ServiceGoods = options => {
const
resetForm
=
()
=>
clearCurrent
(
checkFormList
).
forEach
(({
current
})
=>
current
.
reset
());
const
resetForm
=
()
=>
clearCurrent
(
checkFormList
).
forEach
(({
current
})
=>
current
.
reset
());
const
onValuesChange
=
e
=>
{
const
onValuesChange
=
e
=>
{
console
.
log
(
'
e======
'
,
e
,
!
isEdit
,
visibleCacheEdit
);
//
console.log('e======', e, !isEdit, visibleCacheEdit);
if
(
!
isEdit
)
{
if
(
!
isEdit
)
{
if
(
visibleCacheEdit
)
{
if
(
visibleCacheEdit
)
{
setVisibleCacheEdit
(
false
);
setVisibleCacheEdit
(
false
);
...
@@ -513,6 +513,7 @@ const ServiceGoods = options => {
...
@@ -513,6 +513,7 @@ const ServiceGoods = options => {
ref=
{
basicRef
}
ref=
{
basicRef
}
editData=
{
editData
.
infoMation
}
editData=
{
editData
.
infoMation
}
newCategoryList=
{
newCategoryList
}
newCategoryList=
{
newCategoryList
}
shopGetByProductType=
{
shopGetByProductType
}
categoryList=
{
categoryList
}
categoryList=
{
categoryList
}
virtualCategoryList=
{
virtualCategoryList
}
virtualCategoryList=
{
virtualCategoryList
}
brandList=
{
brandList
}
brandList=
{
brandList
}
...
...
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