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
b7ca48c5
Commit
b7ca48c5
authored
Sep 24, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:交易规则配置
parent
c39b0484
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
RuleSetting.tsx
...s/transaction/transactionRules/components/RuleSetting.tsx
+10
-9
No files found.
src/pages/transaction/transactionRules/components/RuleSetting.tsx
View file @
b7ca48c5
...
...
@@ -235,17 +235,18 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
useEffect
(()
=>
{
async
function
getInitValue
()
{
const
{
data
}
=
await
PublicApi
.
getOrderTradingRulesDetails
({
id
:
id
})
;
const
{
data
}
=
await
PublicApi
.
getOrderTradingRulesDetails
({
id
:
id
})
if
(
data
.
isTacitlyApprove
===
2
)
{
const
res
=
await
getBindingProducts
({
id
:
id
.
toString
(),
current
:
'1'
,
pageSize
:
'10'
})
;
addSchemaAction
.
setFieldState
(
'products'
,
(
state
)
=>
{
const
res
=
await
getBindingProducts
({
id
:
id
.
toString
(),
current
:
'1'
,
pageSize
:
'10'
})
addSchemaAction
.
setFieldState
(
'products'
,
state
=>
{
state
.
value
=
res
.
data
})
setProductsLength
(
res
.
totalCount
)
;
setProductsLength
(
res
.
totalCount
)
}
addSchemaAction
.
setFieldValue
(
'isElectronicContract'
,
data
?.
isElectronicContract
?
true
:
false
)
addSchemaAction
.
setFieldValue
(
'transactionProcesssId'
,
data
?.
transactionProcesssId
)
addSchemaAction
.
setFieldValue
(
'isTacitlyApprove'
,
data
?.
isTacitlyApprove
)
addSchemaAction
.
setFieldValue
(
'isElectronicContract'
,
data
.
isElectronicContract
?
true
:
false
)
addSchemaAction
.
setFieldValue
(
'transactionProcesssId'
,
data
.
transactionProcesssId
)
console
.
log
(
data
)
addSchemaAction
.
setFieldValue
(
'isTacitlyApprove'
,
data
.
isTacitlyApprove
)
setInitialValue
(
data
)
}
if
(
id
!=
''
)
{
...
...
@@ -263,7 +264,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
if
(
id
!==
''
)
{
const
result
=
await
getBindingProducts
({
id
,
current
:
page
.
toString
(),
pageSize
:
size
.
toString
()})
addSchemaAction
.
setFieldValue
(
'products'
,
result
.
data
)
}
}
}
return
(
...
...
@@ -291,7 +292,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
state
.
visible
=
parentState
.
value
})
})
$
(
'onField
Value
Change'
,
'shopIds'
).
subscribe
(
parentState
=>
{
$
(
'onField
Input
Change'
,
'shopIds'
).
subscribe
(
parentState
=>
{
setFieldState
(
'isTacitlyApprove'
,
state
=>
{
state
.
value
=
1
})
...
...
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