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
51b017ed
Commit
51b017ed
authored
Dec 31, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改平台支付参数配置
parent
20c98210
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
97 additions
and
84 deletions
+97
-84
marketing.ts
src/constants/const/marketing.ts
+67
-68
payment.ts
src/constants/const/payment.ts
+10
-0
modal.tsx
...mManage/ruleSettingManage/paySetting/components/modal.tsx
+2
-2
parameter.tsx
...age/ruleSettingManage/paySetting/components/parameter.tsx
+1
-0
index.tsx
...pages/systemManage/ruleSettingManage/paySetting/index.tsx
+17
-14
No files found.
src/constants/const/marketing.ts
View file @
51b017ed
/*
* @Author: XieZhiXiong
* @Date: 2021-08-03 14:54:50
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-03 14:55:39
* @Description: 营销活动相关常量
*/
/* --------------------------------- 平台优惠券类型 -------------------------------- */
/**
* 0元购买抵扣券
*/
export
const
MERCHANT_COUPON_TYPE_VOUCHER
=
1
;
/**
* 通用优惠券
*/
export
const
MERCHANT_COUPON_TYPE_UNIVERSAL
=
2
;
/**
* 品类优惠券
*/
export
const
MERCHANT_COUPON_TYPE_CATEGORY
=
3
;
/**
* 品牌优惠券
*/
export
const
MERCHANT_COUPON_TYPE_BRAND
=
4
;
/**
* 商品优惠券
*/
export
const
MERCHANT_COUPON_TYPE_PRODUCT
=
5
;
/* --------------------------------- 平台优惠券领取方式 -------------------------------- */
/**
* 前台用户领券
*/
export
const
MERCHANT_COUPON_RECEIVE_FRONT
=
1
;
/**
* 指定会员发券
*/
export
const
MERCHANT_COUPON_RECEIVE_DESIGNATED
=
2
;
/**
* 营销活动用券
*/
export
const
MERCHANT_COUPON_RECEIVE_ACTIVITY
=
3
;
/**
* 会员运营用券
*/
export
const
MERCHANT_COUPON_RECEIVE_OPERATE
=
4
;
/* --------------------------------- 平台优惠券适用用户 -------------------------------- */
/**
* 新用户(不包含会员)
*/
export
const
SUITABLE_TYPE_NEW_USER
=
1
;
/**
* 老用户(不包含会员)
*/
export
const
SUITABLE_TYPE_OLD_USER
=
2
;
/**
* 新会员(仅会员用户)
*/
export
const
SUITABLE_TYPE_NEW_MEMBER
=
3
;
/**
* 老会员(仅会员用户)
*/
export
const
SUITABLE_TYPE_OLD_MEMBER
=
4
;
\ No newline at end of file
/*
* @Author: XieZhiXiong
* @Date: 2021-08-03 14:54:50
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-03 14:55:39
* @Description: 营销活动相关常量
*/
/* --------------------------------- 平台优惠券类型 -------------------------------- */
/**
* 0元购买抵扣券
*/
export
const
MERCHANT_COUPON_TYPE_VOUCHER
=
1
;
/**
* 通用优惠券
*/
export
const
MERCHANT_COUPON_TYPE_UNIVERSAL
=
2
;
/**
* 品类优惠券
*/
export
const
MERCHANT_COUPON_TYPE_CATEGORY
=
3
;
/**
* 品牌优惠券
*/
export
const
MERCHANT_COUPON_TYPE_BRAND
=
4
;
/**
* 商品优惠券
*/
export
const
MERCHANT_COUPON_TYPE_PRODUCT
=
5
;
/* --------------------------------- 平台优惠券领取方式 -------------------------------- */
/**
* 前台用户领券
*/
export
const
MERCHANT_COUPON_RECEIVE_FRONT
=
1
;
/**
* 指定会员发券
*/
export
const
MERCHANT_COUPON_RECEIVE_DESIGNATED
=
2
;
/**
* 营销活动用券
*/
export
const
MERCHANT_COUPON_RECEIVE_ACTIVITY
=
3
;
/**
* 会员运营用券
*/
export
const
MERCHANT_COUPON_RECEIVE_OPERATE
=
4
;
/* --------------------------------- 平台优惠券适用用户 -------------------------------- */
/**
* 新用户(不包含会员)
*/
export
const
SUITABLE_TYPE_NEW_USER
=
1
;
/**
* 老用户(不包含会员)
*/
export
const
SUITABLE_TYPE_OLD_USER
=
2
;
/**
* 新会员(仅会员用户)
*/
export
const
SUITABLE_TYPE_NEW_MEMBER
=
3
;
/**
* 老会员(仅会员用户)
*/
export
const
SUITABLE_TYPE_OLD_MEMBER
=
4
;
src/constants/const/payment.ts
View file @
51b017ed
...
...
@@ -60,3 +60,13 @@ export const CONSTRUCTION_PAY = 7
* 建行支付 - 数字人民币 17
*/
export
const
CONSTRUCTION_NUMBER_RMBPAY
=
17
/**
* 线上支付 - 微信退款证书 14
*/
export
const
LINE_UP_KEY_PATH
=
14
/**
* 通联支付 - 微信退款证书 41
*/
export
const
UNIVERSAL_KEY_PATH
=
14
src/pages/systemManage/ruleSettingManage/paySetting/components/modal.tsx
View file @
51b017ed
...
...
@@ -65,10 +65,10 @@ const ModalLayout: React.FC<ModalProps> = ({
},
[
payChannel
])
useEffect
(()
=>
{
if
(
payChannel
)
{
if
(
payChannel
&&
visible
)
{
handleChannelFind
();
}
},
[
payChannel
])
},
[
payChannel
,
visible
])
const
handleCancel
=
()
=>
{
onCancel
()
...
...
src/pages/systemManage/ruleSettingManage/paySetting/components/parameter.tsx
View file @
51b017ed
...
...
@@ -79,6 +79,7 @@ const ParameterLayout: React.FC<ModalProps> = ({
form
.
validateFields
().
then
(
res
=>
{
onConfirm
({
...
res
,
payChannel
,
key
:
channel
.
filter
(
item
=>
item
.
code
===
res
.
code
)[
0
].
key
,
})
form
.
resetFields
();
...
...
src/pages/systemManage/ruleSettingManage/paySetting/index.tsx
View file @
51b017ed
...
...
@@ -28,6 +28,8 @@ import {
CONSTRUCTION_PAY
,
CONSTRUCTION_B2BPAY
,
CONSTRUCTION_NUMBER_RMBPAY
,
LINE_UP_KEY_PATH
,
UNIVERSAL_KEY_PATH
}
from
'@/constants/const/payment'
const
PIC_MAP
=
{
...
...
@@ -39,6 +41,7 @@ const PIC_MAP = {
12
:
alipay
,
13
:
tonglian
,
14
:
unionpay
,
/** 默认图标 */
15
:
balance
,
};
...
...
@@ -135,8 +138,8 @@ const PaySettingLayout = () => {
width
:
'50%'
,
ellipsis
:
true
,
render
:
(
text
,
record
)
=>
<>
{
(
record
.
code
===
14
||
record
.
code
===
41
)
&&
<
Typography
.
Link
href=
{
text
}
target=
"_blank"
>
{
text
}
</
Typography
.
Link
>
}
{
(
record
.
code
!==
14
&&
record
.
code
!==
41
)
&&
<>
{
text
}
</>
}
{
(
record
.
code
===
LINE_UP_KEY_PATH
||
record
.
code
===
UNIVERSAL_KEY_PATH
)
&&
<
Typography
.
Link
href=
{
text
}
target=
"_blank"
>
{
text
}
</
Typography
.
Link
>
}
{
(
record
.
code
!==
LINE_UP_KEY_PATH
&&
record
.
code
!==
UNIVERSAL_KEY_PATH
)
&&
<>
{
text
}
</>
}
</>
},
{
...
...
@@ -337,7 +340,6 @@ const PaySettingLayout = () => {
}
/** 编辑支付参数 */
const
handleEdit
=
(
record
,
index
,
__payChannel
)
=>
{
console
.
log
(
__payChannel
,
'__payChannel'
)
setPayChannel
(
__payChannel
)
setValue
(
record
);
setEditIndex
(
index
);
...
...
@@ -362,13 +364,15 @@ const PaySettingLayout = () => {
/** 商户参数配置 - 查询会员通用支付参数配置列表 */
const
handleCommonParameterList
=
()
=>
{
getOrderPlatformPaymentMemberCommonParameterList
({
payChannel
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
message
.
error
(
res
.
message
);
return
}
setParameterList
(
res
.
data
);
})
if
(
LINE_UP_ALIPAY
===
Number
(
payChannel
))
{
getOrderPlatformPaymentMemberCommonParameterList
({
payChannel
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
message
.
error
(
res
.
message
);
return
}
setParameterList
(
res
.
data
);
})
}
}
useEffect
(()
=>
{
...
...
@@ -507,10 +511,10 @@ const PaySettingLayout = () => {
shouldUpdate=
{
(
prevValues
,
currentValues
)
=>
prevValues
[
`payChannel_${_item.payChannel}`
]
!==
currentValues
[
`payChannel_${_item.payChannel}`
]
}
>
{
({
getFieldValue
})
=>
(
getFieldValue
(
`payChannel_${_item.payChannel}`
)
===
1
getFieldValue
(
`payChannel_${_item.payChannel}`
)
===
LINE_UP_ALIPAY
)
&&
(
<
Fragment
>
<
div
className=
{
style
.
anchor
}
>
{
`${_item.payChannelName}支付参数配置`
}{
getFieldValue
(
`payChannel_${_item.payChannel}`
)
===
1
?
<
span
className=
{
style
.
tag
}
>
会员直接到账模式
</
span
>
:
null
}
</
div
>
<
div
className=
{
style
.
anchor
}
>
{
`${_item.payChannelName}支付参数配置`
}{
getFieldValue
(
`payChannel_${_item.payChannel}`
)
===
LINE_UP_ALIPAY
?
<
span
className=
{
style
.
tag
}
>
会员直接到账模式
</
span
>
:
null
}
</
div
>
<
Button
style=
{
{
marginBottom
:
'24px'
}
}
onClick=
{
()
=>
window
.
open
(
'/system/ruleSettingManager/merchantPayType'
)
}
>
商户参数配置
</
Button
>
<
Form
.
Item
wrapperCol=
{
{
span
:
24
}
}
...
...
@@ -579,11 +583,10 @@ const PaySettingLayout = () => {
<
ParameterLayout
value=
{
value
}
visible=
{
parameterVisible
}
payChannel=
{
payChannel
}
payChannel=
{
LINE_UP_ALIPAY
.
toString
()
}
onConfirm=
{
handleParameterConfirm
}
onCancel=
{
handleParameterCancel
}
/>
</
Fragment
>
}
/>
...
...
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