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
shenshaokai
jinfa-platform
Commits
f18da48c
Commit
f18da48c
authored
Jan 14, 2022
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 添加productType字段处理交易规则渠道商品跳转异常问题
parent
160bd7ba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
addRule.tsx
src/pages/transaction/transactionRules/addRule.tsx
+3
-1
ruleSetting.tsx
...s/transaction/transactionRules/components/ruleSetting.tsx
+14
-2
No files found.
src/pages/transaction/transactionRules/addRule.tsx
View file @
f18da48c
...
...
@@ -33,7 +33,9 @@ const AddRule:React.FC<{}> = () => {
name
:
item
.
name
,
category
:
item
.
customerCategoryName
,
priceType
:
item
.
priceType
,
brand
:
item
.
brandName
brand
:
item
.
brandName
,
// 标识渠道商品 1是 0否
productType
:
item
.
productType
,
}))
const
params
=
omit
(
values
,
[
'status'
])
// 移除不需要的字段
...
...
src/pages/transaction/transactionRules/components/ruleSetting.tsx
View file @
f18da48c
...
...
@@ -91,7 +91,13 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
dataIndex
:
'name'
,
title
:
intl
.
formatMessage
({
id
:
'processRuleSetting.shangpinmingcheng'
,
defaultMessage
:
'商品名称'
}),
key
:
'name'
,
render
:
(
_
,
record
)
=>
<
EyePreview
url=
{
`/memberCenter/commodityAbility/commodity/products/detail?id=${record.commodityId}`
}
>
{
_
}
</
EyePreview
>
render
:
(
_
,
record
)
=>
<
EyePreview
url=
{
record
.
productType
===
1
?
`/memberCenter/commodityAbility/commodity/products/directChannel/detail?id=${record.commodityId}`
:
`/memberCenter/commodityAbility/commodity/products/detail?id=${record.commodityId}`
}
>
{
_
}
</
EyePreview
>
},
{
dataIndex
:
'customerCategoryName'
,
...
...
@@ -132,7 +138,12 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
const
handleOkAddProduct
=
async
()
=>
{
setVisibleChannelRroduct
(
false
)
setProductsLength
(
productRowCtl
.
selectRow
.
length
);
addSchemaAction
.
setFieldValue
(
'products'
,
productRowCtl
.
selectRow
)
console
.
log
(
productRowCtl
.
selectRow
)
// productType 1是 0否渠道商品
addSchemaAction
.
setFieldValue
(
'products'
,
productRowCtl
.
selectRow
.
map
(
item
=>
({
...
item
,
productType
:
item
.
isChannelCommodity
===
undefined
?
item
.
productType
:
+
item
.
isChannelCommodity
})))
clearModalParams
()
}
...
...
@@ -311,6 +322,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
commodityId
:
item
.
productId
,
customerCategoryName
:
item
.
category
,
brandName
:
item
.
brand
,
productType
:
item
.
productType
,
})))
}
}
...
...
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