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
a8926610
Commit
a8926610
authored
Oct 15, 2020
by
LeeJiancong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'条件筛选换写法'
parent
013bdcbc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
97 additions
and
89 deletions
+97
-89
index.ts
src/components/ModalTable/schema/index.ts
+0
-3
global.d.ts
src/global/config/global.d.ts
+0
-72
detail.tsx
src/pages/ruleSettingManage/payStrategy/detail.tsx
+97
-14
No files found.
src/components/ModalTable/schema/index.ts
View file @
a8926610
...
...
@@ -412,7 +412,6 @@ export const payStrategySchema:ISchema = {
properties
:
{
memberTypeId
:
{
type
:
'string'
,
"x-component"
:
'Input'
,
enum
:
[],
"x-component-props"
:
{
placeholder
:
'会员类型'
,
...
...
@@ -423,7 +422,6 @@ export const payStrategySchema:ISchema = {
},
roleId
:
{
type
:
'string'
,
"x-component"
:
'Input'
,
enum
:
[],
"x-component-props"
:
{
placeholder
:
'会员角色'
,
...
...
@@ -434,7 +432,6 @@ export const payStrategySchema:ISchema = {
},
level
:
{
type
:
'string'
,
"x-component"
:
'Input'
,
enum
:
[],
"x-component-props"
:
{
placeholder
:
'会员等级'
,
...
...
src/global/config/global.d.ts
deleted
100644 → 0
View file @
013bdcbc
export
interface
BusinessType
{
businessTypeId
:
number
;
businessTypeName
:
string
;
}
export
interface
UseType
{
memberTypeId
:
number
;
memberTypeName
:
string
;
businessTypes
:
BusinessType
[];
}
export
interface
UserRegister
{
useType
:
UseType
[];
}
export
interface
RuleConfiguration
{
value
:
number
;
label
:
string
;
platformType
:
number
;
}
export
interface
PayWayResponse
{
payType
:
number
;
value
:
number
;
label
:
string
;
}
export
interface
PayInitializeConfig
{
payType
:
number
;
ruleConfigurations
:
RuleConfiguration
[];
payWayResponses
:
PayWayResponse
[];
}
export
interface
PayPlatformPayConfig
{
id
:
number
;
way
:
string
;
payType
:
number
;
isPitchOn
:
number
;
}
export
interface
PayConfig
{
payInitializeConfig
:
PayInitializeConfig
[];
payPlatformPayConfig
:
PayPlatformPayConfig
[];
}
export
interface
CountryList
{
name
:
string
;
key
:
string
;
icon
:
string
;
}
export
interface
Children
{
code
:
string
;
}
export
interface
MenuList
{
code
:
string
;
children
:
Children
[];
}
export
interface
Global
{
logo
:
string
;
countryList
:
CountryList
[];
menuList
:
MenuList
[];
}
export
interface
RootObject
{
userRegister
:
UserRegister
;
payConfig
:
PayConfig
;
global
:
Global
;
}
\ No newline at end of file
src/pages/ruleSettingManage/payStrategy/detail.tsx
View file @
a8926610
...
...
@@ -3,7 +3,7 @@
* @Date: 2020-08-06 19:07:53
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-10-15 17:
09:2
6
* @LastEditTime: 2020-10-15 17:
35:0
6
*/
import
React
,
{
useEffect
,
useState
,
useRef
}
from
'react'
import
{
Card
,
Button
,
Modal
}
from
'antd'
...
...
@@ -17,6 +17,7 @@ import PayForm from '../components/PayForm'
import
ModalTable
from
'@/components/ModalTable'
import
Search
from
'@/components/NiceForm/components/Search'
import
SearchSelect
from
'@/components/NiceForm/components/SearchSelect'
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
import
{
useInitValue
}
from
'@/formSchema/effects/useInitValue'
import
{
strategyDetailTab
}
from
'../schema'
import
{
usePageStatus
,
PageStatus
}
from
'@/hooks/usePageStatus'
...
...
@@ -194,7 +195,13 @@ const PaySetting: React.FC<{}> = () => {
}
PublicApi
.
getMemberManagePageitems
().
then
(
res
=>
{
return
()
=>
{
}
},
[])
const
fetchSelectOptions
=
async
()
=>
{
let
res
=
await
PublicApi
.
getMemberManagePageitems
()
if
(
res
.
code
===
1000
){
let
{
data
}
=
res
let
a
=
[{
value
:
''
,
label
:
'请选择'
}]
...
...
@@ -211,13 +218,16 @@ const PaySetting: React.FC<{}> = () => {
value
:
v
.
level
,
label
:
v
.
levelTag
}))
setfilterParams
({...
filterParams
,
roleList
:[...
a
,...
roleList
],
levelList
:[...
a
,...
leverList
],
memberTypeList
:
[...
a
,...
memberTypeList
]
})
return
{
memberTypeId
:
[...
a
,...
memberTypeList
],
roleId
:
[...
a
,...
roleList
],
level
:[...
a
,...
leverList
]
}
// setfilterParams({...filterParams,roleList:[...a,...roleList],levelList:[...a,...leverList],memberTypeList: [...a,...memberTypeList] })
}
})
return
()
=>
{
}
},
[])
}
const
formSearch
:
ISchema
=
{
type
:
'object'
,
properties
:
{
...
...
@@ -245,7 +255,6 @@ const PaySetting: React.FC<{}> = () => {
properties
:
{
memberTypeId
:
{
type
:
'string'
,
"x-component"
:
'Input'
,
enum
:
filterParams
.
memberTypeList
,
"x-component-props"
:
{
placeholder
:
'会员类型'
,
...
...
@@ -256,7 +265,6 @@ const PaySetting: React.FC<{}> = () => {
},
roleId
:
{
type
:
'string'
,
"x-component"
:
'Input'
,
enum
:
filterParams
.
roleList
,
"x-component-props"
:
{
placeholder
:
'会员角色'
,
...
...
@@ -267,7 +275,6 @@ const PaySetting: React.FC<{}> = () => {
},
level
:
{
type
:
'string'
,
"x-component"
:
'Input'
,
enum
:
filterParams
.
levelList
,
"x-component-props"
:
{
placeholder
:
'会员等级'
,
...
...
@@ -289,6 +296,78 @@ const PaySetting: React.FC<{}> = () => {
}
}
}
// 会员弹框高级筛选
const
formMember
:
ISchema
=
{
type
:
'object'
,
properties
:
{
name
:
{
type
:
'string'
,
'x-component'
:
'ModalSearch'
,
'x-component-props'
:
{
placeholder
:
'请输入会员名称'
,
align
:
'flex-left'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
rowStyle
:
{
flexWrap
:
'nowrap'
,
style
:
{
marginRight
:
0
}
},
colStyle
:
{
marginTop
:
20
,
},
},
properties
:
{
memberTypeId
:
{
type
:
'string'
,
enum
:
[],
"x-component-props"
:
{
placeholder
:
'请选择会员类型'
,
// style: {
// width: 160
// }
}
},
roleId
:
{
type
:
'string'
,
enum
:
[],
"x-component-props"
:
{
placeholder
:
'请选择会员角色'
,
// style: {
// width: 160
// }
}
},
level
:
{
type
:
'string'
,
enum
:
[],
"x-component-props"
:
{
placeholder
:
'请选择会员等级'
,
// style: {
// width: 160
// }
}
},
submit
:
{
"x-component"
:
'Submit'
,
"x-mega-props"
:
{
span
:
1
},
"x-component-props"
:
{
children
:
'查询'
}
}
}
}
}
}
// 整体表单提交
const
handleSubmit
=
(
values
:
any
)
=>
{
let
baseList
:
any
=
GlobalConfig
.
payConfig
.
payInitializeConfig
...
...
@@ -393,19 +472,23 @@ const PaySetting: React.FC<{}> = () => {
columns=
{
columnsSetMember
}
rowSelection=
{
memberRowSelection
}
fetchTableData=
{
params
=>
fetchMemberList
(
params
)
}
modalType=
'payStrategyFilter'
//
modalType='payStrategyFilter'
formilyProps=
{
{
ctx
:
{
schema
:
form
Search
,
schema
:
form
Member
,
components
:
{
ModalSearch
:
Search
,
SearchSelect
,
Submit
,
Input
},
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'name
1
'
,
'name'
,
FORM_FILTER_PATH
,
);
useAsyncInitSelect
(
[
'memberTypeId'
,
'roleId'
,
'level'
],
fetchSelectOptions
,
);
}
}
}
...
...
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