Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
陈智峰
jinfa-platform
Commits
dcb10435
Commit
dcb10435
authored
Apr 12, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 渠道商品上架添加店铺id字段
parent
12ee430b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
index.tsx
src/pages/commodity/goods/index.tsx
+2
-1
directChannel.tsx
src/pages/commodity/products/directChannel.tsx
+5
-3
No files found.
src/pages/commodity/goods/index.tsx
View file @
dcb10435
...
...
@@ -279,12 +279,13 @@ const Goods: React.FC<{}> = () => {
)
const
handleMenuClick
=
(
e
:
any
)
=>
{
//
console.log('menu', e, selectedRowKeys); //
1 批量删除;2 删除导入批次
// 1 批量删除;2 删除导入批次
if
(
e
.
key
===
'1'
)
{
confirm
({
title
:
'确定要执行批量删除操作?'
,
icon
:
<
ExclamationCircleOutlined
/>,
onOk
()
{
if
(
!
goodsRowCtl
.
selectedRowKeys
.
length
)
{
return
message
.
error
(
'请先选择货品'
)
}
PublicApi
.
postProductGoodsDeleteBatchGoods
({
idList
:
goodsRowCtl
.
selectedRowKeys
}).
then
(
res
=>
{
ref
.
current
.
reload
()
})
...
...
src/pages/commodity/products/directChannel.tsx
View file @
dcb10435
...
...
@@ -53,6 +53,7 @@ const DirectChannel: React.FC<{}> = () => {
const
[
shopsOption
,
setShopsOption
]
=
useState
<
GetProductChannelCommodityGetShopResponse
>
([])
const
[
shopsBatchOption
,
setShopsBatchOption
]
=
useState
<
GetProductChannelCommodityGetShopResponse
>
([])
const
[
checkedValues
,
setCheckedValues
]
=
useState
<
any
>
([])
const
[
shopId
,
setShopId
]
=
useState
<
any
>
()
const
[
currentOptionId
,
setCurrentOptionId
]
=
useState
<
number
>
()
const
[
isDisabledOKbtn
,
setIsDisabledOKbtn
]
=
useState
<
boolean
>
(
false
)
const
[
isBatchOption
,
setIsBatchOption
]
=
useState
<
boolean
>
(
false
)
// 是否是批量上下架操作
...
...
@@ -302,6 +303,7 @@ const DirectChannel: React.FC<{}> = () => {
PublicApi
.
getTemplateWebMemberChannelWebFindCurrMemberChannel
().
then
(
res
=>
{
if
(
res
.
data
.
id
){
setCheckedValues
(
values
)
setShopId
(
res
.
data
.
shopId
)
}
else
{
message
.
error
(
'您还没有开通店铺,无法上下架商品!'
)
}
...
...
@@ -326,7 +328,7 @@ const DirectChannel: React.FC<{}> = () => {
if
(
isBatchOption
){
// 批量操作区分上下架
if
(
isUp
){
if
(
checkedValues
.
length
>
0
){
PublicApi
.
postProductChannelCommodityBatchPublishCommodity
(
params
).
then
(
res
=>
{
PublicApi
.
postProductChannelCommodityBatchPublishCommodity
(
{...
params
,
storeId
:
shopId
}
).
then
(
res
=>
{
setUpDownModal
(
false
)
ref
.
current
.
reload
()
setIsDisabledOKbtn
(
false
)
...
...
@@ -345,7 +347,7 @@ const DirectChannel: React.FC<{}> = () => {
}
else
{
if
(
isUp
){
if
(
checkedValues
.
length
>
0
){
PublicApi
.
postProductChannelCommodityPublishCommodity
({...
params
,
isPublish
:
isUp
}).
then
(
res
=>
{
PublicApi
.
postProductChannelCommodityPublishCommodity
({...
params
,
isPublish
:
isUp
,
storeId
:
shopId
}).
then
(
res
=>
{
setUpDownModal
(
false
)
ref
.
current
.
reload
()
setIsDisabledOKbtn
(
false
)
...
...
@@ -355,7 +357,7 @@ const DirectChannel: React.FC<{}> = () => {
message
.
error
(
'请选择需要上架的渠道商城'
)
}
}
else
{
PublicApi
.
postProductChannelCommodityPublishCommodity
({...
params
,
isPublish
:
isUp
}).
then
(
res
=>
{
PublicApi
.
postProductChannelCommodityPublishCommodity
({...
params
,
isPublish
:
isUp
,
storeId
:
shopId
}).
then
(
res
=>
{
setUpDownModal
(
false
)
ref
.
current
.
reload
()
setIsDisabledOKbtn
(
false
)
...
...
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