Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
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-admin
Commits
ddde3262
Commit
ddde3262
authored
Dec 24, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-system
into v2
parents
fa169a29
2ab7af3a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
126 additions
and
30 deletions
+126
-30
index.tsx
...pages/systemManage/ruleSettingManage/paySetting/index.tsx
+126
-30
No files found.
src/pages/systemManage/ruleSettingManage/paySetting/index.tsx
View file @
ddde3262
...
...
@@ -81,6 +81,10 @@ const PaySettingLayout = () => {
const
[
isEdit
,
setIsEdit
]
=
useState
<
boolean
>
(
false
);
const
[
editIndex
,
setEditIndex
]
=
useState
<
number
>
(
0
);
// 建行支付 -> 2021-12-23新增
const
[
visibleBankPay
,
setVisibleBankPay
]
=
useState
<
boolean
>
(
false
);
const
[
bankPayChannel
,
setBankPayChannel
]
=
useState
<
string
>
(
'1'
);
const
[
parameterList
,
setParameterList
]
=
useState
<
parameters
[]
>
([])
// 商户支付参数列表
const
columns
:
ColumnType
<
any
>
[]
=
[
...
...
@@ -295,14 +299,20 @@ const PaySettingLayout = () => {
const
toggle
=
(
id
:
string
,
payType
)
=>
{
setValue
({})
if
(
payType
===
1
)
{
setPayChannel
(
id
);
setVisible
(
true
);
}
else
{
setPayChannelUnicom
(
id
);
setVisibleUnicom
(
true
)
switch
(
payType
)
{
case
1
:
setPayChannel
(
id
);
setVisible
(
true
);
break
;
case
6
:
setPayChannelUnicom
(
id
);
setVisibleUnicom
(
true
);
break
;
case
7
:
setBankPayChannel
(
id
);
setVisibleBankPay
(
true
);
break
;
}
}
const
handleCancel
=
(
payType
)
=>
{
...
...
@@ -319,38 +329,62 @@ const PaySettingLayout = () => {
_parameters
.
forEach
((
item
:
any
)
=>
{
const
_channels
=
[...
item
.
channels
]
_channels
.
forEach
(
_item
=>
{
if
(
payType
===
1
)
{
if
(
_item
.
payChannel
===
Number
(
payChannel
))
{
if
(
isEdit
)
{
_item
.
parameters
[
editIndex
]
=
format
;
}
else
{
_item
.
parameters
.
push
(
format
)
// if (payType === 1) {
// if (_item.payChannel === Number(payChannel)) {
// if (isEdit) {
// _item.parameters[editIndex] = format;
// } else {
// _item.parameters.push(format)
// }
// }
// } else {
// if (_item.payChannel === Number(payChannelUnicom)) {
// if (isEdit) {
// _item.parameters[editIndex] = format;
// } else {
// _item.parameters.push(format)
// }
// }
// }
switch
(
payType
)
{
case
1
:
if
(
_item
.
payChannel
===
Number
(
payChannel
))
{
if
(
isEdit
)
{
_item
.
parameters
[
editIndex
]
=
format
;
}
else
{
_item
.
parameters
.
push
(
format
)
}
}
}
}
else
{
if
(
_item
.
payChannel
===
Number
(
payChannelUnicom
))
{
if
(
isEdit
)
{
_item
.
parameters
[
editIndex
]
=
format
;
}
else
{
_item
.
parameters
.
push
(
format
)
break
;
case
6
:
if
(
_item
.
payChannel
===
Number
(
payChannelUnicom
))
{
if
(
isEdit
)
{
_item
.
parameters
[
editIndex
]
=
format
;
}
else
{
_item
.
parameters
.
push
(
format
)
}
}
}
break
;
case
7
:
if
(
_item
.
payChannel
===
Number
(
bankPayChannel
))
{
if
(
isEdit
)
{
_item
.
parameters
[
editIndex
]
=
format
;
}
else
{
_item
.
parameters
.
push
(
format
)
}
}
break
;
}
// if (_item.payChannel === Number(payChannel)) {
// if (isEdit) {
// _item.parameters[editIndex] = format;
// } else {
// _item.parameters.push(format)
// }
// }
})
})
setIsEdit
(
false
);
setParameters
(
_parameters
);
if
(
payType
===
1
)
{
setVisible
(
false
);
}
else
{
}
else
if
(
payType
===
6
)
{
setVisibleUnicom
(
false
)
}
else
{
}
}
...
...
@@ -586,7 +620,7 @@ const PaySettingLayout = () => {
})
}
</
Tabs
>
)
}
{
(
item
.
payType
!==
1
&&
item
.
payType
!==
6
)
&&
(
{
(
item
.
payType
!==
1
&&
item
.
payType
!==
6
&&
item
.
payType
!==
7
)
&&
(
<
Fragment
>
{
item
.
channels
.
map
((
_item
,
_index
)
=>
(
<
Fragment
key=
{
_item
.
payChannel
}
>
...
...
@@ -669,6 +703,60 @@ const PaySettingLayout = () => {
})
}
</
Tabs
>
)
}
{
/* 建行支付 */
}
{
item
.
payType
===
7
&&
(
<
Fragment
>
{
item
.
channels
.
map
((
_item
,
_index
)
=>
(
<
Fragment
key=
{
_item
.
payChannel
}
>
<
Form
.
Item
label=
{
_item
.
payChannelName
}
name=
{
`payChannel_${_item.payChannel}`
}
initialValue=
{
`_${_item.payChannel}`
}
>
<
Radio
.
Group
size=
"small"
buttonStyle=
"solid"
onChange=
{
(
e
)
=>
handleRadioChang
(
e
,
item
.
payType
)
}
>
<
Radio
.
Button
value=
{
_item
.
payChannel
}
>
是
</
Radio
.
Button
>
<
Radio
.
Button
value=
{
`_${_item.payChannel}`
}
>
否
</
Radio
.
Button
>
</
Radio
.
Group
>
</
Form
.
Item
>
<
Form
.
Item
noStyle
shouldUpdate=
{
(
prevValues
,
currentValues
)
=>
prevValues
[
`payChannel_${_item.payChannel}`
]
!==
currentValues
[
`payChannel_${_item.payChannel}`
]
}
>
{
({
getFieldValue
})
=>
(
getFieldValue
(
`payChannel_${_item.payChannel}`
)
===
16
)
&&
(
<
Fragment
>
<
div
className=
{
style
.
anchor
}
>
{
`${_item.payChannelName}支付参数配置`
}{
getFieldValue
(
`payChannel_${_item.payChannel}`
)
===
1
?
<
span
className=
{
style
.
tag
}
>
平台代收模式
</
span
>
:
null
}
</
div
>
<
Form
.
Item
wrapperCol=
{
{
span
:
24
}
}
name=
{
`payChannel_${_item.payChannel}`
}
>
<
Table
rowKey=
{
(
_record
:
any
,
index
:
any
)
=>
`table${index + 1}`
}
columns=
{
columnsUnicom
}
dataSource=
{
dataSource
(
item
.
payType
,
_item
.
payChannel
)
}
pagination=
{
false
}
/>
<
Button
type=
'dashed'
block
icon=
{
<
PlusOutlined
/>
}
style=
{
{
marginBottom
:
'24px'
}
}
onClick=
{
()
=>
toggle
(
_item
.
payChannel
,
7
)
}
>
新增参数配置
</
Button
>
</
Form
.
Item
>
</
Fragment
>
)
}
</
Form
.
Item
>
</
Fragment
>
))
}
</
Fragment
>
)
}
</
div
>
</
Card
>
))
}
...
...
@@ -689,6 +777,14 @@ const PaySettingLayout = () => {
onConfirm=
{
(
format
)
=>
handleConfirm
(
format
,
6
)
}
onCancel=
{
()
=>
handleCancel
(
6
)
}
/>
{
/* 建行支付 */
}
<
ModalLayout
value=
{
value
}
visible=
{
visibleBankPay
}
payChannel=
{
bankPayChannel
}
onConfirm=
{
(
format
)
=>
handleConfirm
(
format
,
7
)
}
onCancel=
{
()
=>
handleCancel
(
6
)
}
/>
{
/* 商家支付参数 */
}
<
ParameterLayout
value=
{
value
}
...
...
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