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
4ad2efed
Commit
4ad2efed
authored
Oct 22, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-system
into dev
parents
37ea23df
617c523c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
282 additions
and
11 deletions
+282
-11
index.ts
config/routes/index.ts
+2
-0
package.json
package.json
+2
-1
index.tsx
src/components/ModalTable/index.tsx
+6
-2
index.ts
src/components/ModalTable/schema/index.ts
+70
-0
index.ts
src/constants/index.ts
+2
-2
detail.tsx
src/pages/ruleSettingManage/payStrategy/detail.tsx
+198
-5
ytt.config.ts
ytt.config.ts
+2
-1
No files found.
config/routes/index.ts
View file @
4ad2efed
...
...
@@ -33,6 +33,8 @@ const routeList = [
authConfig
,
commentRoutes
,
contentRoute
,
requisitionRoute
,
enquiryOfferRoute
,
]
const
router
=
[
{
...
...
package.json
View file @
4ad2efed
...
...
@@ -19,7 +19,8 @@
"test"
:
"umi-test"
,
"test:coverage"
:
"umi-test --coverage"
,
"start:cross"
:
"cross-env SITE_ID=352 yarn start"
,
"start:cross-dev"
:
"cross-env SITE_ID=352 yarn start"
"start:cross-dev"
:
"cross-env SITE_ID=352 yarn start"
,
"start:10"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.10:8100 yarn start"
},
"lint-staged"
:
{
"*.{js,jsx,less,md,json}"
:
[
...
...
src/components/ModalTable/index.tsx
View file @
4ad2efed
...
...
@@ -2,7 +2,7 @@ import React, { ReactText, useRef, useEffect } from 'react'
import
{
StandardTable
}
from
'god'
import
{
IStandardTableProps
}
from
'god/dist/src/standard-table'
import
{
Row
,
Col
,
Modal
}
from
'antd'
import
{
productModalSchema
,
productModalByMemberSchema
,
memberModalSchema
,
inquirySchema
,
demandSchema
,
enquirySchema
,
mergeOrderSchema
}
from
'./schema'
import
{
productModalSchema
,
productModalByMemberSchema
,
memberModalSchema
,
inquirySchema
,
demandSchema
,
enquirySchema
,
mergeOrderSchema
,
payStrategySchema
}
from
'./schema'
import
Search
from
'../NiceForm/components/Search'
import
SearchSelect
from
'../NiceForm/components/SearchSelect'
import
Submit
from
'../NiceForm/components/Submit'
...
...
@@ -17,7 +17,7 @@ export interface ModalTableProps extends IStandardTableProps<any> {
cancel
?(),
visible
?:
boolean
,
resetModal
?:
object
,
modalType
?:
'productByDefault'
|
'productByMember'
|
'memberByDefault'
|
'inquiryByDefault'
|
'demandByDefault'
|
'enquiryModel'
|
'MergeOrderByDefault'
|
'none'
modalType
?:
'productByDefault'
|
'productByMember'
|
'memberByDefault'
|
'inquiryByDefault'
|
'demandByDefault'
|
'enquiryModel'
|
'MergeOrderByDefault'
|
'payStrategyFilter'
|
'none'
}
const
ModalTable
:
React
.
FC
<
ModalTableProps
>
=
(
props
)
=>
{
...
...
@@ -61,6 +61,10 @@ const ModalTable:React.FC<ModalTableProps> = (props) => {
case
'MergeOrderByDefault'
:
{
return
mergeOrderSchema
}
case
'payStrategyFilter'
:{
return
payStrategySchema
}
case
'none'
:
{
return
{}
}
...
...
src/components/ModalTable/schema/index.ts
View file @
4ad2efed
...
...
@@ -383,4 +383,73 @@ export const mergeOrderSchema: ISchema = {
}
}
}
}
export
const
payStrategySchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
name
:
{
type
:
'string'
,
"x-component"
:
'Search'
,
"x-component-props"
:
{
placeholder
:
'请输入会员名称'
}
},
[
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
:
'查询'
}
}
}
}
}
}
\ No newline at end of file
src/constants/index.ts
View file @
4ad2efed
...
...
@@ -82,8 +82,8 @@ export enum LAYOUT_TYPE {
}
// 本地环境跳过权限校验
export
const
isDev
=
process
.
env
.
NODE_ENV
===
"development"
// export const isDev = fals
e
//
export const isDev = process.env.NODE_ENV === "development"
export
const
isDev
=
tru
e
export
const
STATUS_ENUM
=
[
{
...
...
src/pages/ruleSettingManage/payStrategy/detail.tsx
View file @
4ad2efed
...
...
@@ -3,7 +3,7 @@
* @Date: 2020-08-06 19:07:53
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-
09-30 16:30
:06
* @LastEditTime: 2020-
10-15 17:35
:06
*/
import
React
,
{
useEffect
,
useState
,
useRef
}
from
'react'
import
{
Card
,
Button
,
Modal
}
from
'antd'
...
...
@@ -15,15 +15,29 @@ import EyePreview from '@/components/EyePreview'
import
{
createFormActions
,
ISchema
}
from
'@formily/antd'
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'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
history
}
from
'umi'
import
{
findItemAndDelete
}
from
'@/utils'
import
{
GlobalConfig
}
from
'@/global/config'
import
{
PublicApi
}
from
'@/services/api'
import
style
from
'./index.less'
import
{
Submit
}
from
'@formily/antd'
import
{
Input
,
NumberPicker
,
FormTab
,
FormMegaLayout
,
Select
,
ArrayTable
}
from
'@formily/antd-components'
const
payActions
=
createFormActions
()
/**
* @description: 会员弹窗列表
...
...
@@ -31,7 +45,7 @@ const payActions = createFormActions()
* @return {type}
*/
const
fetchMemberList
=
async
(
params
)
=>
{
const
res
=
await
PublicApi
.
get
PayApplyMemberList
(
params
)
const
res
=
await
PublicApi
.
get
MemberManageAllProviderPage
(
params
)
return
res
.
data
}
...
...
@@ -42,6 +56,11 @@ const PaySetting: React.FC<{}> = () => {
const
[
searchParams
,
setsearchParams
]
=
useState
({
memberName
:
''
})
const
[
filterParams
,
setfilterParams
]
=
useState
<
any
>
({
memberTypeList
:
[],
levelList
:
[],
roleList
:
[]
})
const
[
memberRowSelection
,
memberRowCtl
]
=
useRowSelectionTable
({
customKey
:
'memberId'
})
const
[
optionType
,
setoptionType
]
=
useState
(
0
)
const
{
preview
,
pageStatus
}
=
usePageStatus
()
...
...
@@ -174,23 +193,181 @@ const PaySetting: React.FC<{}> = () => {
}
})
}
return
()
=>
{
}
},
[])
const
fetchSelectOptions
=
async
()
=>
{
let
res
=
await
PublicApi
.
getMemberManagePageitems
()
if
(
res
.
code
===
1000
){
let
{
data
}
=
res
let
a
=
[{
value
:
''
,
label
:
'请选择'
}]
let
roleList
=
data
.
roles
.
map
(
v
=>
({
value
:
v
.
roleId
,
label
:
v
.
roleName
}))
let
memberTypeList
=
data
.
memberTypes
.
map
(
v
=>
({
value
:
v
.
memberTypeId
,
label
:
v
.
memberTypeName
}))
let
leverList
=
data
.
levels
.
map
(
v
=>
({
value
:
v
.
level
,
label
:
v
.
levelTag
}))
return
{
memberTypeId
:
[...
a
,...
memberTypeList
],
roleId
:
[...
a
,...
roleList
],
level
:[...
a
,...
leverList
]
}
// setfilterParams({...filterParams,roleList:[...a,...roleList],levelList:[...a,...leverList],memberTypeList: [...a,...memberTypeList] })
}
}
const
formSearch
:
ISchema
=
{
type
:
'object'
,
properties
:
{
memberN
ame
:
{
n
ame
:
{
type
:
'string'
,
"x-component"
:
'Search'
,
"x-component-props"
:
{
placeholder
:
'请输入会员名称'
}
},
[
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
:
filterParams
.
memberTypeList
,
"x-component-props"
:
{
placeholder
:
'会员类型'
,
style
:
{
width
:
160
}
}
},
roleId
:
{
type
:
'string'
,
enum
:
filterParams
.
roleList
,
"x-component-props"
:
{
placeholder
:
'会员角色'
,
style
:
{
width
:
160
}
}
},
level
:
{
type
:
'string'
,
enum
:
filterParams
.
levelList
,
"x-component-props"
:
{
placeholder
:
'会员等级'
,
style
:
{
width
:
160
}
}
},
submit
:
{
"x-component"
:
'Submit'
,
"x-mega-props"
:
{
span
:
1
},
"x-component-props"
:
{
children
:
'查询'
}
}
}
}
}
}
// 会员弹框高级筛选
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
...
...
@@ -287,6 +464,7 @@ const PaySetting: React.FC<{}> = () => {
/>
</
Card
>
<
ModalTable
width=
{
800
}
modalTitle=
'选择适用会员'
confirm=
{
handleOkAddMember
}
cancel=
{
handleCancelAddMember
}
...
...
@@ -294,10 +472,25 @@ const PaySetting: React.FC<{}> = () => {
columns=
{
columnsSetMember
}
rowSelection=
{
memberRowSelection
}
fetchTableData=
{
params
=>
fetchMemberList
(
params
)
}
// modalType='payStrategyFilter'
formilyProps=
{
{
ctx
:
{
schema
:
formSearch
}
ctx
:
{
schema
:
formMember
,
components
:
{
ModalSearch
:
Search
,
SearchSelect
,
Submit
,
Input
},
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'name'
,
FORM_FILTER_PATH
,
);
useAsyncInitSelect
(
[
'memberTypeId'
,
'roleId'
,
'level'
],
fetchSelectOptions
,
);
}
}
}
}
tableProps=
{
{
...
...
ytt.config.ts
View file @
4ad2efed
...
...
@@ -7,7 +7,8 @@ const tokenList = [
{
name
:
'Template'
,
token
:
'7ec923520215c7e2f771867cb4d29cafbf823daf0fb2d3d9fa70b57a523c8bfb'
},
// 店铺模板服务
{
name
:
'Pay'
,
token
:
'c789e0e56ee8a8cc2fbd85f930eb2928c58fc1014583c6643acf29cff954da49'
},
// 支付服务
{
name
:
'Search'
,
token
:
'ca19f532efba91f7773cbfbd526b798c6ac83df670071e97d72c50dca1d53a48'
},
// 搜索服务
{
name
:
'Order'
,
token
:
'5de0aaeaac12c8d911d86dada6cd128993e34cd6e13135fa79246aa5979a2bcd'
},
//订单服务
{
name
:
'Order'
,
token
:
'5de0aaeaac12c8d911d86dada6cd128993e34cd6e13135fa79246aa5979a2bcd'
},
//订单服务,
{
name
:
'Settle'
,
token
:
'fffbeeaaa198c285955997c606bc279fc6950fea118580c786f2c73eecccaa6a'
},
//结算服务
]
const
getConfigMap
=
(
tokens
)
=>
tokens
.
map
(
v
=>
({
...
...
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