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
d6327f7b
Commit
d6327f7b
authored
Sep 17, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:渠道商品详情查看跳转
parent
01c90c71
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
18 deletions
+22
-18
viewDirectChannel.tsx
src/pages/commodity/products/viewDirectChannel.tsx
+10
-3
addRule.tsx
src/pages/transaction/transactionRules/addRule.tsx
+6
-8
RuleSetting.tsx
...s/transaction/transactionRules/components/RuleSetting.tsx
+3
-4
index.tsx
src/pages/transaction/transactionRules/effects/index.tsx
+2
-2
index.tsx
src/pages/transaction/transactionRules/schema/index.tsx
+1
-1
No files found.
src/pages/commodity/products/viewDirectChannel.tsx
View file @
d6327f7b
...
...
@@ -131,11 +131,18 @@ const ViewDriectChannel: React.FC<{}> = () => {
<
Space
direction=
"vertical"
style=
{
{
width
:
'100%'
}
}
>
<
Card
headStyle=
{
{
borderBottom
:
'none'
}
}
title=
"商品信息"
>
<
p
>
<
Avatar
size=
{
48
}
shape=
"square"
src=
{
channelDetails
?.
unitPriceAndPicList
[
0
]?.
commodityPic
&&
channelDetails
.
unitPriceAndPicList
[
0
].
commodityPic
[
0
]
}
/>
<
Avatar
size=
{
48
}
shape=
"square"
src=
{
channelDetails
?.
channelCommodity
?.
commodity
?.
mainPic
}
/>
<
span
style=
{
{
color
:
'rgba(23,43,77,1)'
,
fontSize
:
20
,
fontWeight
:
500
,
marginLeft
:
16
}
}
>
{
channelDetails
?.
name
}
</
span
>
<
span
style=
{
{
color
:
'#E63F3B'
,
padding
:
'2px 5px'
,
background
:
'rgba(255,235,230,1)'
,
borderRadius
:
'4px'
,
marginLeft
:
16
,
marginRight
:
16
}
}
>
{
channelDetails
?.
channelCommodity
?.
source
===
1
?
"上级渠道"
:
"渠道自有"
}
</
span
>
<
a
>
去查看
>
</
a
>
{
/* <a href={channelDetails?.source === 1 ? `/shop/commodity/detail?id=${channelDetails?.channelCommodity?.commodity?.id}` : `/memberCenter/commodityAbility/commodity/products/viewProducts?id=${channelDetails?.channelCommodity?.commodity?.id}`}>去查看 ></a> */
}
{
/* <a>去查看 ></a> */
}
<
a
href=
{
channelDetails
?.
channelCommodity
?.
source
===
1
?
`/channelmall/commodity/detail?id=${channelDetails?.channelCommodity?.commodity?.id}&channelId=${btoa(JSON.stringify({ shopId: '', memberId: channelDetails?.channelCommodity?.parentMemberId }))}`
:
`/memberCenter/commodityAbility/commodity/products/viewProducts?id=${channelDetails?.channelCommodity?.commodity?.id}`
}
// target="blank"
>
去查看
>
</
a
>
</
p
>
{
content
}
</
Card
>
...
...
src/pages/transaction/transactionRules/addRule.tsx
View file @
d6327f7b
...
...
@@ -25,14 +25,12 @@ const AddRule:React.FC<{}> = (props) => {
// 整体表单提交
const
formSubmit
=
async
(
values
)
=>
{
const
params
=
omit
(
values
,
[
'NO_SUBMIT3'
])
if
(
params
[
'applyMember'
])
{
params
[
'applyMember'
]
=
params
[
'applyMember'
].
map
(
v
=>
v
.
memberId
)
}
await
PublicApi
.
postWarehouseFreightSpaceAdd
(
params
)
setTimeout
(()
=>
{
history
.
goBack
(
-
1
)
},
1000
)
// const params = omit(values, ['NO_SUBMIT3'])
console
.
log
(
values
,
'values'
)
// await PublicApi.postOrderTradingRulesAdd(params)
// setTimeout(() => {
// history.goBack(-1)
// }, 1000)
}
return
(
...
...
src/pages/transaction/transactionRules/components/RuleSetting.tsx
View file @
d6327f7b
...
...
@@ -39,8 +39,8 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
pageStatus
}
=
usePageStatus
()
const
initValue
=
useInitValue
(
PublicApi
.
get
WarehouseFreightSpace
Details
)
useUnitPreview
(
initValue
,
addSchemaAction
)
const
initValue
=
useInitValue
(
PublicApi
.
get
OrderTradingRules
Details
)
//
useUnitPreview(initValue, addSchemaAction)
const
fetchProductList
=
async
(
params
)
=>
{
const
tradingRulesId
=
addSchemaAction
.
getFieldValue
(
'transactionProcesssId'
)
...
...
@@ -54,7 +54,6 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
// table删除商品
const
handleDeleteTable
=
(
id
)
=>
{
const
value
=
addSchemaAction
.
getFieldValue
(
'products'
)
console
.
log
(
value
,
'v'
,
findItemAndDelete
(
value
,
id
))
addSchemaAction
.
setFieldValue
(
'products'
,
findItemAndDelete
(
value
,
id
,
'productId'
))
}
...
...
@@ -230,7 +229,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
})
createAddContractTemplateEffect
(
addSchemaAction
)
$
(
'onFieldValueChange'
,
'isElectronicContract'
).
subscribe
(
parentState
=>
{
setFieldState
(
'
contractTemplate
Id'
,
state
=>
{
setFieldState
(
'
electronicContract
Id'
,
state
=>
{
state
.
visible
=
parentState
.
value
})
})
...
...
src/pages/transaction/transactionRules/effects/index.tsx
View file @
d6327f7b
...
...
@@ -7,7 +7,7 @@ const { onFieldValueChange$ } = FormEffectHooks
export
const
createAddContractTemplateEffect
=
(
context
:
ISchemaFormActions
)
=>
{
const
fetchListContractTemplateAll
=
async
()
=>
{
const
{
data
}
=
await
PublicApi
.
getOrderSelectListContractTemplate
()
context
.
setFieldState
(
'
contractTemplate
Id'
,
state
=>
{
context
.
setFieldState
(
'
electronicContract
Id'
,
state
=>
{
state
.
contractTemplateLists
=
data
})
return
data
.
map
(
v
=>
({
...
...
@@ -16,7 +16,7 @@ export const createAddContractTemplateEffect = (context: ISchemaFormActions) =>
}))
}
useAsyncSelect
(
'
contractTemplate
Id'
,
fetchListContractTemplateAll
)
useAsyncSelect
(
'
electronicContract
Id'
,
fetchListContractTemplateAll
)
}
export
const
useUnitPreview
=
(
initValue
,
context
)
=>
{
...
...
src/pages/transaction/transactionRules/schema/index.tsx
View file @
d6327f7b
...
...
@@ -76,7 +76,7 @@ export const ruleDetailSchema: ISchema = padRequiredMessage({
"x-component"
:
"checkboxsingle"
,
default
:
false
},
contractTemplate
Id
:
{
electronicContract
Id
:
{
type
:
'string'
,
required
:
true
,
enum
:
[],
...
...
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