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
linweijiong
jinfa-platform
Commits
971b1a10
Commit
971b1a10
authored
Jun 04, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 添加交易规则自动取消订单时间
parent
9ecddb23
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
8 deletions
+41
-8
RuleSetting.tsx
...s/transaction/transactionRules/components/RuleSetting.tsx
+25
-8
index.tsx
src/pages/transaction/transactionRules/schema/index.tsx
+16
-0
No files found.
src/pages/transaction/transactionRules/components/RuleSetting.tsx
View file @
971b1a10
import
React
,
{
useEffect
,
use
Ref
,
use
State
}
from
'react'
import
React
,
{
useEffect
,
useState
}
from
'react'
import
{
usePageStatus
,
PageStatus
}
from
'@/hooks/usePageStatus'
import
{
useInitValue
}
from
'@/formSchema/effects/useInitValue'
import
EyePreview
from
'@/components/EyePreview'
import
{
findItemAndDelete
}
from
'@/utils'
import
{
ISchemaFormActions
,
ISchema
,
FormEffectHooks
,
createAsyncFormActions
}
from
'@formily/antd'
import
{
ISchemaFormActions
,
ISchema
,
FormEffectHooks
}
from
'@formily/antd'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
createAddContractTemplateEffect
,
useUnitPreview
}
from
'../effects'
import
{
createAddContractTemplateEffect
}
from
'../effects'
import
{
PublicApi
}
from
'@/services/api'
import
{
PlusOutlined
,
LinkOutlined
,
PlusOutlined
,
QuestionCircleOutlined
,
}
from
'@ant-design/icons'
import
{
Button
,
message
}
from
'antd'
import
{
Button
,
message
,
Tooltip
}
from
'antd'
import
NiceForm
from
'@/components/NiceForm'
import
ModalTable
from
'@/components/ModalTable'
import
{
GlobalConfig
}
from
'@/global/config'
...
...
@@ -256,6 +254,11 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
addSchemaAction
.
setFieldValue
(
'isElectronicContract'
,
data
.
isElectronicContract
?
true
:
false
)
addSchemaAction
.
setFieldValue
(
'transactionProcesssId'
,
data
.
transactionProcesssId
)
addSchemaAction
.
setFieldValue
(
'isTacitlyApprove'
,
data
.
isTacitlyApprove
)
if
(
data
.
type
===
1
)
{
addSchemaAction
.
setFieldState
(
'time'
,
state
=>
{
state
.
visible
=
true
})
}
setInitialValue
(
data
)
}
if
(
id
!=
''
)
{
...
...
@@ -288,6 +291,13 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
})
}
const
help
=
(
text
:
string
,
desc
:
string
)
=>
(<>
{
text
}
<
Tooltip
title=
{
desc
}
>
<
QuestionCircleOutlined
/>
</
Tooltip
>
</>)
return
(
<>
<
NiceForm
...
...
@@ -298,7 +308,8 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
tableColumns
,
tableAddButton
,
paginationChange
,
productsLength
productsLength
,
help
}
}
components=
{
{
SelectProcesss
,
...
...
@@ -325,10 +336,16 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
setFieldState
(
"MEGA_LAYOUT1_1"
,
state
=>
{
state
.
visible
=
false
})
setFieldState
(
"time"
,
state
=>
{
state
.
visible
=
false
})
}
else
{
setFieldState
(
"MEGA_LAYOUT1_1"
,
state
=>
{
state
.
visible
=
true
})
setFieldState
(
"time"
,
state
=>
{
state
.
visible
=
true
})
}
})
}
}
...
...
src/pages/transaction/transactionRules/schema/index.tsx
View file @
971b1a10
...
...
@@ -74,6 +74,22 @@ export const ruleDetailSchema: ISchema = padRequiredMessage({
// fetchSearch: PublicApi.getOrderTradingRulesTransactionProcessList,
// },
},
"time"
:
{
type
:
'string'
,
title
:
"{{help('订单取消时间', '单后超过多少小时未支付后自动取消订单')}}"
,
"x-component-props"
:
{
placeholder
:
"请填写订单取消时间"
,
style
:
{
width
:
'100%'
},
suffix
:
'小时'
},
visible
:
false
,
'x-rules'
:
[
{
pattern
:
/^
\d
+
(\.\d{1})?
$/
,
message
:
'数值仅限一位小数'
,
}
],
},
MEGA_LAYOUT1_1
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
...
...
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