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
ef47bc8c
Commit
ef47bc8c
authored
Jan 15, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改支付策略选择指定会员, 支付参数设置
parent
852b4096
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
26 deletions
+60
-26
settingIndex.tsx
src/pages/ruleSettingManage/paySetting/settingIndex.tsx
+20
-10
detail.tsx
src/pages/ruleSettingManage/payStrategy/detail.tsx
+9
-3
template.tsx
src/pages/systemManage/sensitiveWords/template.tsx
+18
-7
template.tsx
src/pages/systemManage/unit/template.tsx
+13
-6
No files found.
src/pages/ruleSettingManage/paySetting/settingIndex.tsx
View file @
ef47bc8c
...
...
@@ -6,7 +6,7 @@
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
Button
,
Card
,
Tabs
,
Space
,
Input
,
InputNumber
,
message
}
from
'antd'
;
import
{
Button
,
Card
,
Tabs
,
Space
,
Input
,
InputNumber
,
message
}
from
'antd'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
PayWayRadio
from
'./components/payWayRadio'
;
...
...
@@ -101,30 +101,40 @@ const PayWaySetTemplate: React.FC<{}> = () => {
let
wayName
=
''
;
try
{
payItem
.
forEach
(
item
=>
{
if
(
item
.
way
===
'微信'
&&
item
.
isPitchOn
===
1
)
{
if
(
item
.
payWayId
===
2
&&
item
.
isPitchOn
===
1
)
{
console
.
log
(
1
)
if
(
item
.
payParametersAddListRequests
.
length
>
0
)
{
if
(
item
.
payParametersAddListRequests
.
length
>
0
)
{
conditions
=
true
}
else
{
conditions
=
false
wayName
=
item
.
way
wayName
=
`
${
item
.
way
}
缺少支付参数配置`
throw
new
Error
}
}
else
if
(
item
.
way
===
'支付宝'
&&
item
.
isPitchOn
===
1
)
{
console
.
log
(
2
)
if
(
item
.
payParametersAddListRequests
.
length
>
0
&&
item
.
payParametersList
.
length
>
0
)
{
}
else
if
(
item
.
payWayId
===
1
&&
item
.
isPitchOn
===
1
)
{
if
(
item
.
payParametersAddListRequests
.
length
>
0
&&
item
.
payParametersList
.
length
>
0
)
{
conditions
=
true
}
else
{
conditions
=
false
wayName
=
item
.
way
wayName
=
`
${
item
.
way
}
缺少支付参数配置`
throw
new
Error
}
}
else
if
(
item
.
payWayId
===
6
&&
item
.
isPitchOn
===
1
)
{
if
(
item
.
payParametersAddListRequests
.
length
>
0
)
{
const
data
=
item
.
payParametersAddListRequests
[
0
]
if
(
data
.
code
&&
data
.
value
&&
data
.
describe
)
{
conditions
=
true
}
else
{
conditions
=
false
wayName
=
`请配置
${
item
.
way
}
的参数`
throw
new
Error
}
}
}
else
{
conditions
=
true
}
})
}
catch
{
message
.
error
(
`
${
wayName
}
缺少支付参数配置`
)
message
.
error
(
wayName
)
}
if
(
conditions
)
{
PublicApi
.
postPayCollectionParametersAdd
({
...
...
@@ -199,7 +209,7 @@ const PayWaySetTemplate: React.FC<{}> = () => {
/>
}
{
(
payItem
[
idx
].
i
d
===
6
&&
!!
payItem
[
idx
].
isPitchOn
)
&&
(
payItem
[
idx
].
payWayI
d
===
6
&&
!!
payItem
[
idx
].
isPitchOn
)
&&
<
div
style=
{
{
marginTop
:
42
}
}
>
<
Space
direction=
"horizontal"
size=
{
16
}
>
初始申请额度不超过
...
...
src/pages/ruleSettingManage/payStrategy/detail.tsx
View file @
ef47bc8c
...
...
@@ -45,8 +45,14 @@ const payActions = createFormActions()
* @return {type}
*/
const
fetchMemberList
=
async
(
params
)
=>
{
const
res
=
await
PublicApi
.
getMemberManageAllProviderPage
(
params
)
return
res
.
data
return
new
Promise
(
resolve
=>
{
PublicApi
.
getPayGetMembers
(
params
).
then
(
res
=>
{
res
.
data
.
data
.
forEach
((
item
:
any
)
=>
{
item
.
name
=
item
.
memberName
})
resolve
(
res
.
data
)
})
})
}
const
PaySetting
:
React
.
FC
<
{}
>
=
()
=>
{
...
...
@@ -74,7 +80,7 @@ const PaySetting: React.FC<{}> = () => {
},
{
title
:
'会员名称'
,
dataIndex
:
'
n
ame'
,
dataIndex
:
'
memberN
ame'
,
align
:
'center'
,
key
:
'name'
,
},
...
...
src/pages/systemManage/sensitiveWords/template.tsx
View file @
ef47bc8c
...
...
@@ -17,24 +17,35 @@ const tailLayout = {
const
{
TextArea
}
=
Input
;
const
Template
:
React
.
FC
<
{}
>
=
()
=>
{
const
[
form
]
=
Form
.
useForm
();
const
[
lodaing
,
setLodaing
]
=
useState
<
boolean
>
(
false
);
const
{
pathname
,
query
}
=
history
.
location
;
const
type
=
pathname
.
split
(
'/'
)[
pathname
.
split
(
'/'
).
length
-
1
];
const
onFinish
=
(
values
:
any
)
=>
{
if
(
type
===
'add'
)
{
PublicApi
.
postManageSensitiveWordAdd
(
values
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
PublicApi
.
postManageSensitiveWordAdd
({...
values
},
{
ctlType
:
'none'
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
history
.
goBack
();
},
2000
)
message
.
success
(
'新增敏感词成功'
)
setLodaing
(
true
)
}
}).
catch
(()
=>
{
setLodaing
(
false
)
})
}
else
{
values
.
id
=
query
.
id
;
PublicApi
.
postManageSensitiveWordUpdate
(
values
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
PublicApi
.
postManageSensitiveWordUpdate
({...
values
},
{
ctlType
:
'none'
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
history
.
goBack
();
},
2000
)
message
.
success
(
'修改敏感词成功'
)
setLodaing
(
true
)
}
}).
catch
(()
=>
{
setLodaing
(
false
)
})
}
}
...
...
@@ -76,7 +87,7 @@ const Template:React.FC<{}> = () => {
</
Form
.
Item
>
<
Form
.
Item
{
...
tailLayout
}
>
<
Space
size=
{
24
}
>
<
Button
type=
'primary'
htmlType=
"submit"
>
保存
</
Button
>
<
Button
type=
'primary'
loading=
{
lodaing
}
htmlType=
"submit"
>
保存
</
Button
>
<
Popconfirm
onConfirm=
{
confirmCancel
}
title=
"确定要执行这个操作?"
...
...
src/pages/systemManage/unit/template.tsx
View file @
ef47bc8c
import
React
,
{
useEffect
}
from
'react'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
history
}
from
'umi'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
...
...
@@ -16,28 +16,35 @@ const tailLayout = {
const
Template
:
React
.
FC
<
{}
>
=
()
=>
{
const
[
form
]
=
Form
.
useForm
();
const
[
lodaing
,
setLodaing
]
=
useState
<
boolean
>
(
false
);
const
{
pathname
,
query
}
=
history
.
location
;
const
type
=
pathname
.
split
(
'/'
)[
pathname
.
split
(
'/'
).
length
-
1
];
const
onFinish
=
(
values
:
any
)
=>
{
if
(
type
===
'add'
)
{
PublicApi
.
postManageUnitSaveOrUpdateUnit
(
values
).
then
(
res
=>
{
PublicApi
.
postManageUnitSaveOrUpdateUnit
(
{...
values
},
{
ctlType
:
'none'
}
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
history
.
goBack
();
},
1
000
)
},
2
000
)
message
.
success
(
'新增单位成功'
)
setLodaing
(
true
)
}
}).
catch
(()
=>
{
setLodaing
(
false
)
})
}
else
{
values
.
id
=
query
.
id
;
PublicApi
.
postManageUnitSaveOrUpdateUnit
(
values
).
then
(
res
=>
{
PublicApi
.
postManageUnitSaveOrUpdateUnit
(
{...
values
},
{
ctlType
:
'none'
}
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
history
.
goBack
();
},
1
000
)
},
2
000
)
message
.
success
(
'修改单位成功'
)
setLodaing
(
true
)
}
}).
catch
(()
=>
{
setLodaing
(
false
)
})
}
}
...
...
@@ -80,7 +87,7 @@ const Template: React.FC<{}> = () => {
</
Form
.
Item
>
<
Form
.
Item
{
...
tailLayout
}
>
<
Space
size=
{
24
}
>
<
Button
type=
'primary'
htmlType=
"submit"
>
保存
</
Button
>
<
Button
type=
'primary'
loading=
{
lodaing
}
htmlType=
"submit"
>
保存
</
Button
>
<
Popconfirm
onConfirm=
{
confirmCancel
}
title=
"确定要执行这个操作?"
...
...
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