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
4dfcd1e8
Commit
4dfcd1e8
authored
Dec 29, 2020
by
XieZhiXiong
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
c1a0cfc2
4febc025
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
634 additions
and
145 deletions
+634
-145
advertisementInfo.tsx
src/pages/content/advertisement/advertisementInfo.tsx
+48
-9
advertisementInfoSchema.tsx
.../content/advertisement/schema/advertisementInfoSchema.tsx
+21
-17
index.tsx
src/pages/content/advertisement/schema/index.tsx
+3
-2
utils.tsx
src/pages/content/utils/utils.tsx
+14
-8
index.tsx
src/pages/message/index.tsx
+15
-14
index.tsx
src/pages/orderSystem/index.tsx
+115
-50
index.tsx
src/pages/orderSystem/readyConfirmPayList/index.tsx
+43
-17
index.ts
src/pages/orderSystem/readyConfirmPayList/schema/index.ts
+51
-17
payWayRadio.tsx
...s/ruleSettingManage/paySetting/components/payWayRadio.tsx
+43
-0
payWayTable.tsx
...s/ruleSettingManage/paySetting/components/payWayTable.tsx
+116
-0
setUpModal.tsx
...es/ruleSettingManage/paySetting/components/setUpModal.tsx
+102
-0
usePayTypeEnum.ts
...ruleSettingManage/paySetting/components/usePayTypeEnum.ts
+31
-0
index.less
src/pages/ruleSettingManage/paySetting/index.less
+6
-0
index.tsx
src/pages/ruleSettingManage/paySetting/index.tsx
+4
-5
settingIndex.tsx
src/pages/ruleSettingManage/paySetting/settingIndex.tsx
+0
-0
index.tsx
src/pages/ruleSettingManage/payStrategy/index.tsx
+8
-4
index.tsx
...leSettingManage/platformSettlementStrategy/list/index.tsx
+14
-2
No files found.
src/pages/content/advertisement/advertisementInfo.tsx
View file @
4dfcd1e8
...
...
@@ -3,8 +3,8 @@ import { PageHeaderWrapper } from "@ant-design/pro-layout";
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
history
,
Prompt
}
from
'umi'
;
import
{
Card
,
Modal
}
from
'antd'
;
import
{
SchemaForm
,
createFormActions
,
FormButtonGroup
,
Submit
,
Reset
}
from
'@formily/antd'
import
{
Card
}
from
'antd'
;
import
{
SchemaForm
,
createFormActions
,
FormButtonGroup
,
Submit
,
FormEffectHooks
}
from
'@formily/antd'
import
advertisementInfoSchema
from
'./schema/advertisementInfoSchema'
;
import
{
Input
,
Select
,
Button
}
from
'antd'
;
// import CustomUpload from '@/components/NiceForm/components/CustomUpload';
...
...
@@ -12,8 +12,28 @@ import { PublicApi } from '@/services/api';
import
{
useInitialValues
}
from
'../hooks/useInitialValues'
;
import
CustomUpload
from
'../components/WrapCustomUpload'
;
import
useCustomValidator
from
'../hooks/useValidator'
import
{
sortedList
,
ADVERTISE_WEB_COLUMN_TYPE
,
ADVERTISE_APP_COLUMN_TYPE
}
from
'../utils/utils'
;
enum
ChannelEnum
{
WEB
=
1
,
APP
=
2
,
}
const
WEB_COLUMN_TYPE
=
Object
.
keys
(
ADVERTISE_WEB_COLUMN_TYPE
).
map
((
item
)
=>
{
return
{
label
:
ADVERTISE_WEB_COLUMN_TYPE
[
item
],
value
:
parseInt
(
item
)
}
})
const
APP_COLUMN_TYPE
=
Object
.
keys
(
ADVERTISE_APP_COLUMN_TYPE
).
map
((
item
)
=>
{
return
{
label
:
ADVERTISE_APP_COLUMN_TYPE
[
item
],
value
:
parseInt
(
item
)
}
})
const
actions
=
createFormActions
();
const
{
onFieldValueChange$
}
=
FormEffectHooks
;
const
AdvertisementInfo
=
()
=>
{
useCustomValidator
()
...
...
@@ -24,14 +44,14 @@ const AdvertisementInfo = () => {
const
isEdit
=
id
&&
!
preview
;
const
isAdd
=
!
id
&&
!
preview
;
const
isView
=
id
&&
preview
;
const
handleSubmit
=
(
value
)
=>
{
console
.
log
(
value
)
// const { title, columnType, sort, link, imageUrl} = value;
const
serviceActions
=
isAdd
?
PublicApi
.
postManageContentAdvertAdd
:
PublicApi
.
postManageContentAdvertUpdate
let
tempData
=
value
;
const
postData
=
isAdd
?
tempData
:
{...
tempData
,
id
};
setSubmitLoading
(
true
);
...
...
@@ -44,6 +64,25 @@ const AdvertisementInfo = () => {
})
}
const
formEffects
=
()
=>
()
=>
{
onFieldValueChange$
(
'channel'
).
subscribe
(
fieldState
=>
{
const
isActive
=
fieldState
.
active
;
let
options
:
{
label
:
string
,
value
:
number
|
string
}[]
=
[]
if
(
fieldState
.
value
===
ChannelEnum
.
WEB
)
{
options
=
WEB_COLUMN_TYPE
}
else
{
options
=
APP_COLUMN_TYPE
}
actions
.
setFieldState
(
'columnType'
,
(
state
)
=>
{
state
.
props
[
"x-component-props"
][
"options"
]
=
options
;
if
(
isActive
)
{
state
.
value
=
""
;
}
})
})
}
const
handleCancel
=
()
=>
{
history
.
push
(
'/content/advertisement'
)
}
...
...
@@ -64,11 +103,12 @@ const AdvertisementInfo = () => {
initialValues=
{
initialValues
?.
data
}
onSubmit=
{
handleSubmit
}
editable=
{
isAdd
||
isEdit
}
effects=
{
formEffects
()
}
expressionScope=
{
{
label
:
(
<
div
>
{
isAdd
||
isEdit
isAdd
||
isEdit
?
<
span
style=
{
{
color
:
'#ff4d4f'
}
}
>
*
</
span
>
:
null
}
...
...
@@ -78,12 +118,12 @@ const AdvertisementInfo = () => {
}
}
>
{
isAdd
||
isEdit
isAdd
||
isEdit
?
(
<
FormButtonGroup
offset=
{
3
}
>
<
Submit
loading=
{
submitLoading
}
>
提交
</
Submit
>
<
Button
onClick=
{
handleCancel
}
>
取消
</
Button
>
</
FormButtonGroup
>
</
FormButtonGroup
>
)
:
<></>
}
...
...
@@ -94,4 +134,4 @@ const AdvertisementInfo = () => {
)
}
export
default
AdvertisementInfo
\ No newline at end of file
export
default
AdvertisementInfo
src/pages/content/advertisement/schema/advertisementInfoSchema.tsx
View file @
4dfcd1e8
import
{
sortedList
,
ADVERTISE_COLUMN_TYPE
}
from
'../../utils/utils'
;
const
columnType
=
(()
=>
{
const
res
=
Object
.
keys
(
ADVERTISE_COLUMN_TYPE
).
map
((
item
)
=>
{
return
{
label
:
ADVERTISE_COLUMN_TYPE
[
item
],
value
:
parseInt
(
item
)
}
})
return
res
;
})()
import
{
sortedList
,
}
from
'../../utils/utils'
;
const
sortListOptions
=
sortedList
(
1
,
6
);
...
...
@@ -38,16 +28,31 @@ const schema = {
},
{
limitByte
:
true
,
// 自定义校验规则
maxByte
:
60
,
maxByte
:
60
,
}
]
},
channel
:
{
title
:
'投放渠道'
,
type
:
'string'
,
"x-component"
:
'Select'
,
'x-component-props'
:
{
options
:
[
{
label
:
'Web'
,
value
:
1
},
{
label
:
'App'
,
value
:
2
},
],
},
"x-rules"
:
[{
"required"
:
true
,
"message"
:
"请选择投放渠道"
}],
},
columnType
:
{
title
:
'栏目'
,
type
:
'string'
,
'x-component'
:
'Select'
,
'x-component-props'
:
{
options
:
columnType
options
:
[]
},
"x-rules"
:
[{
"required"
:
true
,
...
...
@@ -73,7 +78,7 @@ const schema = {
"x-rules"
:
[
{
limitByte
:
true
,
// 自定义校验规则
maxByte
:
100
,
maxByte
:
100
,
}
]
},
...
...
@@ -90,10 +95,10 @@ const schema = {
"required"
:
true
,
"message"
:
"请上传图片"
},
},
},
}
}
}
}
export
default
schema
\ No newline at end of file
export
default
schema
src/pages/content/advertisement/schema/index.tsx
View file @
4dfcd1e8
...
...
@@ -3,7 +3,8 @@ import { DownOutlined } from '@ant-design/icons';
import
{
TimeList
}
from
'../../statusList'
;
import
moment
from
'moment'
;
import
React
from
'react'
;
import
{
ADVERTISE_COLUMN_TYPE
}
from
'../../utils/utils'
;
import
{
ADVERTISE_WEB_COLUMN_TYPE
,
ADVERTISE_APP_COLUMN_TYPE
}
from
'../../utils/utils'
;
const
ALL_TYPE
=
Object
.
assign
({},
ADVERTISE_WEB_COLUMN_TYPE
,
ADVERTISE_APP_COLUMN_TYPE
);
const
CustomTimeList
=
[{
label
:
'全部'
,
value
:
0
}].
concat
(
TimeList
.
slice
(
1
));
...
...
@@ -23,7 +24,7 @@ const columns = [
title
:
'栏目'
,
dataIndex
:
'columnType'
,
render
:
(
text
,
record
)
=>
{
return
(
<
div
>
{
A
DVERTISE_COLUMN
_TYPE
[
text
]
}
</
div
>
<
div
>
{
A
LL
_TYPE
[
text
]
}
</
div
>
)
},
},
...
...
src/pages/content/utils/utils.tsx
View file @
4dfcd1e8
...
...
@@ -55,13 +55,18 @@ const sortedList = (start, end) => {
return
res
}
// 内容管理 - 广告栏目
const
ADVERTISE_COLUMN_TYPE
=
{
"1"
:
"会员首页-活动广告1"
,
"2"
:
"会员首页-活动广告2"
,
// 内容管理 - 广告栏目
const
ADVERTISE_
WEB_
COLUMN_TYPE
=
{
"1"
:
"会员首页-活动广告1"
,
"2"
:
"会员首页-活动广告2"
,
"3"
:
"会员首页-活动广告3"
}
const
ADVERTISE_APP_COLUMN_TYPE
=
{
"4"
:
'找店铺广告图'
,
"5"
:
"人气店铺广告图"
}
// 内容管理 - 公告栏目
const
ANNOUNCE_COLUMN_TYPE
=
{
'1'
:
'会员首页公告'
,
...
...
@@ -83,7 +88,7 @@ const POSITION = {
}
/**
* 将字典转换成 {label: 'xx', value: 1}
* @param maps
* @param maps
*/
const
transfer2Options
=
(
maps
)
=>
{
const
res
=
Object
.
keys
(
maps
).
map
((
item
)
=>
{
...
...
@@ -101,9 +106,11 @@ export {
setTableDataSource
,
getTableDataSource
,
sortedList
,
ADVERTISE_COLUMN_TYPE
,
ADVERTISE_WEB_COLUMN_TYPE
,
ADVERTISE_APP_COLUMN_TYPE
,
// ADVERTISE_COLUMN_TYPE,
ANNOUNCE_COLUMN_TYPE
,
transfer2Options
,
SCENE
,
POSITION
}
\ No newline at end of file
}
src/pages/message/index.tsx
View file @
4dfcd1e8
...
...
@@ -36,24 +36,25 @@ const Message: React.FC<{}> = () => {
}
const
handleRead
=
(
id
,
url
:
string
)
=>
{
console
.
log
(
"当前功能还未开发"
)
// PublicApi.getReportMessageMemberRead({id: id})
// .then((data) => {
// if(url) {
// if(/http/.test(url)) {
// location.href = url
// } else {
// history.push(url);
// }
// } else {
// getList(pagination);
// }
// })
PublicApi
.
getReportMessagePlatformRead
({
id
:
id
})
.
then
((
data
)
=>
{
if
(
url
)
{
if
(
/http/
.
test
(
url
))
{
location
.
href
=
url
}
else
{
history
.
push
(
url
);
}
return
;
}
if
(
data
.
code
===
1000
)
{
getList
(
pagination
)
}
})
}
const
renderMessage
=
(
data
)
=>
{
return
(
<
div
onClick=
{
()
=>
handleRead
(
data
.
id
,
data
.
url
)
}
>
<
div
onClick=
{
()
=>
handleRead
(
data
.
id
,
data
.
url
)
}
style=
{
{
cursor
:
"pointer"
}
}
>
<
StatusTag
type=
{
data
.
type
==
1
?
'primary'
:
'success'
}
title=
{
data
.
type
===
1
?
'系统消息'
:
'平台消息'
}
/>
<
span
className=
{
styles
.
messageTitle
}
>
{
data
.
title
||
''
}
</
span
>
<
span
className=
{
styles
.
messageText
}
>
{
data
.
content
||
''
}
</
span
>
...
...
src/pages/orderSystem/index.tsx
View file @
4dfcd1e8
import
React
,
{
useState
}
from
'react'
import
React
,
{
use
Ref
,
use
State
}
from
'react'
import
{
Card
,
Button
,
Modal
}
from
'antd'
import
{
StandardTable
}
from
'god'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
...
...
@@ -8,33 +8,75 @@ import { formatTimeString } from '@/utils'
import
{
ORDER_TYPE
,
PurchaseOrderOutWorkStateTexts
,
PurchaseOrderInsideWorkStateTexts
}
from
'@/constants'
import
StatusColors
from
'./components/StatusColors'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
ISchema
}
from
'@formily/antd'
import
{
createFormActions
,
ISchema
}
from
'@formily/antd'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
DatePicker
}
from
'@formily/antd-components'
import
Submit
from
'@/components/NiceForm/components/Submit'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
import
moment
from
'moment'
import
NiceForm
from
'@/components/NiceForm'
const
formActions
=
createFormActions
();
const
tableListSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
orderNo
:
{
type
:
'string'
,
"x-component"
:
'SearchFilter'
,
'x-component-props'
:
{
placeholder
:
'请输入订单编号'
,
align
:
'flex-end'
,
},
},
[
FORM_FILTER_PATH
]:
{
// orderNo: {
// type: 'string',
// "x-component": 'SearchFilter',
// 'x-component-props': {
// placeholder: '请输入订单编号',
// align: 'flex-end',
// },
// },
// [FORM_FILTER_PATH]: {
// type: 'object',
// 'x-component': 'flex-layout',
// 'x-component-props': {
// inline: true,
// colStyle: {
// marginLeft: 20
// }
// },
mageLayout
:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
inline
:
true
,
colStyle
:
{
marginLeft
:
20
}
},
'x-component'
:
'mega-layout'
,
properties
:
{
topLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
grid
:
true
,
},
properties
:
{
ctl
:
{
type
:
'object'
,
'x-component'
:
'Children'
,
'x-component-props'
:
{
children
:
'{{controllerBtns}}'
,
},
},
orderNo
:
{
type
:
'string'
,
"x-component"
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'请输入订单编号'
,
align
:
'flex-end'
,
},
}
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
rowStyle
:
{
flexWrap
:
'nowrap'
,
},
colStyle
:
{
marginLeft
:
20
,
},
},
properties
:
{
orderThe
:
{
type
:
'string'
,
...
...
@@ -67,7 +109,7 @@ const tableListSchema: ISchema = {
children
:
'查询'
,
},
},
},
},
}}
},
}
}
...
...
@@ -159,10 +201,6 @@ export const baseOrderListColumns: any[] = [
export
interface
SaleOrderProps
{
}
const
fetchTableData
=
async
(
params
)
=>
{
// 格式化查询时间
params
.
startCreateTime
=
params
.
startCreateTime
?
moment
(
params
.
startCreateTime
).
valueOf
()
:
undefined
params
.
endCreateTime
=
params
.
endCreateTime
?
moment
(
params
.
endCreateTime
).
valueOf
()
:
undefined
const
{
data
}
=
await
PublicApi
.
getOrderPlatformOrderList
(
params
)
return
data
}
...
...
@@ -171,45 +209,72 @@ const fetchTableData = async (params) => {
// 最后一步开始调试 TODO
const
SaleOrder
:
React
.
FC
<
SaleOrderProps
>
=
(
props
)
=>
{
const
ref
=
useRef
<
any
>
({})
const
secondColumns
:
any
[]
=
baseOrderListColumns
.
concat
([
])
const
controllerBtns
=
<
Button
style=
{
{
width
:
140
}
}
onClick=
{
()
=>
{}
}
type=
'default'
>
导出
</
Button
>
return
<
Card
>
<
StandardTable
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
columns=
{
secondColumns
}
formilyLayouts=
{
{
justify
:
'space-between'
}
}
formilyChilds=
{
{
layouts
:
{
order
:
2
},
children
:
<
Button
style=
{
{
width
:
140
}
}
onClick=
{
()
=>
{}
}
type=
'default'
>
导出
</
Button
>
}
}
formilyProps=
{
{
ctx
:
{
inline
:
false
,
schema
:
tableListSchema
,
effects
:
(
$
,
actions
)
=>
{
currentRef=
{
ref
}
controlRender=
{
<
NiceForm
actions=
{
formActions
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
expressionScope=
{
{
controllerBtns
,
}
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'orderNo'
,
FORM_FILTER_PATH
,
)
;
}
,
components
:
{
DateRangePicker
:
DatePicker
.
RangePicker
,
)
}
}
schema=
{
tableListSchema
}
components=
{
{
DateRangePickerUnix
,
Submit
}
},
layouts
:
{
order
:
3
,
span
:
16
}
}
}
}
}
/>
}
// formilyLayouts={{
// justify: 'space-between'
// }}
// formilyChilds={{
// layouts: {
// order: 2
// },
// children: <Button style={{width: 140}} onClick={() => {}} type='default'>导出</Button>
// }}
// formilyProps={{
// ctx: {
// inline: false,
// schema: tableListSchema,
// effects: ($, actions) => {
// useStateFilterSearchLinkageEffect(
// $,
// actions,
// 'orderNo',
// FORM_FILTER_PATH,
// );
// },
// components: {
// DateRangePicker: DatePicker.RangePicker,
// DateRangePickerUnix,
// Submit
// }
// },
// layouts: {
// order: 3,
// span: 16
// }
// }}
/>
</
Card
>
}
...
...
src/pages/orderSystem/readyConfirmPayList/index.tsx
View file @
4dfcd1e8
import
React
from
'react'
import
React
,
{
useRef
}
from
'react'
import
{
Card
}
from
'antd'
import
{
StandardTable
}
from
'god'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
...
...
@@ -9,7 +9,10 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
Submit
from
'@/components/NiceForm/components/Submit'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
import
{
DatePicker
}
from
'@formily/antd-components'
import
NiceForm
from
'@/components/NiceForm'
import
{
createFormActions
}
from
'@formily/antd'
const
formActions
=
createFormActions
();
// 待确认支付结果订单
...
...
@@ -22,6 +25,7 @@ const fetchTableData = async (params) => {
// TODO
const
FirstApprovedOrder
:
React
.
FC
<
FirstApprovedOrderProps
>
=
(
props
)
=>
{
const
ref
=
useRef
<
any
>
({})
const
{
columns
}
=
useSelfTable
()
...
...
@@ -30,29 +34,51 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
<
StandardTable
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
columns=
{
columns
}
rowKey=
{
'orderNo'
}
formilyLayouts=
{
{
justify
:
'space-between'
tableProps=
{
{
rowKey
:
'orderNo'
}
}
formilyProps=
{
{
ctx
:
{
inline
:
false
,
schema
:
tableListSchema
,
effects
:
(
$
,
actions
)
=>
{
currentRef=
{
ref
}
controlRender=
{
<
NiceForm
actions=
{
formActions
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'orderNo'
,
FORM_FILTER_PATH
,
)
;
}
,
components
:
{
DateRangePicker
:
DatePicker
.
RangePicker
,
)
}
}
schema=
{
tableListSchema
}
components=
{
{
DateRangePickerUnix
,
Submit
}
}
}
}
}
}
/>
}
// formilyLayouts={{
// justify: 'space-between'
// }}
// formilyProps={{
// ctx: {
// inline: false,
// schema: tableListSchema,
// effects: ($, actions) => {
// useStateFilterSearchLinkageEffect(
// $,
// actions,
// 'orderNo',
// FORM_FILTER_PATH,
// );
// },
// components: {
// DateRangePicker: DatePicker.RangePicker,
// DateRangePickerUnix,
// Submit
// }
// }
// }}
/>
</
Card
>
}
...
...
src/pages/orderSystem/readyConfirmPayList/schema/index.ts
View file @
4dfcd1e8
...
...
@@ -7,23 +7,57 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
export
const
tableListSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
orderNo
:
{
type
:
'string'
,
"x-component"
:
'SearchFilter'
,
'x-component-props'
:
{
placeholder
:
'请输入订单编号'
,
align
:
'flex-start'
,
},
},
[
FORM_FILTER_PATH
]:
{
// orderNo: {
// type: 'string',
// "x-component": 'SearchFilter',
// 'x-component-props': {
// placeholder: '请输入订单编号',
// align: 'flex-start',
// },
// },
// [FORM_FILTER_PATH]: {
// type: 'object',
// 'x-component': 'flex-layout',
// 'x-component-props': {
// inline: true,
// colStyle: {
// marginRight: 20
// }
// },
mageLayout
:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
inline
:
true
,
colStyle
:
{
marginRight
:
20
}
},
'x-component'
:
'mega-layout'
,
properties
:
{
topLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
grid
:
true
,
},
properties
:
{
orderNo
:
{
type
:
'string'
,
"x-component"
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'请输入订单编号'
,
align
:
'flex-end'
,
},
}
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
rowStyle
:
{
flexWrap
:
'nowrap'
,
},
colStyle
:
{
marginLeft
:
20
,
},
},
properties
:
{
orderThe
:
{
type
:
'string'
,
...
...
@@ -50,7 +84,7 @@ export const tableListSchema: ISchema = {
children
:
'查询'
,
},
},
},
},
}}
},
}
}
src/pages/ruleSettingManage/paySetting/components/payWayRadio.tsx
0 → 100644
View file @
4dfcd1e8
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Space
,
Radio
,
Form
}
from
'antd'
;
import
"../index.less"
;
interface
params
{
name
:
string
,
value
:
number
,
selectId
:
number
,
onChange
:
Function
}
const
PayWayRadio
:
React
.
FC
<
params
>
=
(
props
)
=>
{
const
{
value
,
selectId
,
onChange
,
name
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
useEffect
(()
=>
{
form
.
resetFields
()
},
[
value
])
const
options
=
[{
label
:
'是'
,
value
:
1
},
{
label
:
'否'
,
value
:
0
}]
return
(
<
Space
size=
{
49
}
>
<
span
>
是否开启
{
name
}
</
span
>
<
Form
form=
{
form
}
>
<
Form
.
Item
name=
{
`radio-${selectId}`
}
noStyle
initialValue=
{
value
}
>
<
Radio
.
Group
options=
{
options
}
className=
'radio-group-box'
size=
"small"
buttonStyle=
"solid"
optionType=
"button"
onChange=
{
(
e
)
=>
onChange
(
e
)
}
/>
</
Form
.
Item
>
</
Form
>
</
Space
>
)
}
export
default
PayWayRadio
;
src/pages/ruleSettingManage/paySetting/components/payWayTable.tsx
0 → 100644
View file @
4dfcd1e8
import
React
,
{
useState
}
from
'react'
;
import
{
Table
,
Button
}
from
'antd'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
SetUpModal
from
'./setUpModal'
;
interface
payWayTableParams
{
name
?:
string
,
payParametersList
?:
any
,
payParametersListResponses
?:
any
,
visible
?:
boolean
,
onGet
:
Function
,
onType
?:
number
,
onDel
:
Function
,
onEdit
:
Function
,
id
?:
number
}
const
PayWayTable
:
React
.
FC
<
payWayTableParams
>
=
(
props
)
=>
{
const
[
modalvisible
,
setmodalvisible
]
=
useState
<
boolean
>
(
false
);
const
[
type
,
setType
]
=
useState
<
any
>
();
// 1.
const
[
edit
,
setedit
]
=
useState
<
any
>
({});
const
[
modifyIndex
,
setModifyIndex
]
=
useState
<
any
>
(
0
)
const
[
modify
,
setmodify
]
=
useState
<
boolean
>
(
false
);
const
{
name
,
payParametersListResponses
,
payParametersList
,
visible
,
onType
,
onGet
,
onDel
,
onEdit
,
id
}
=
props
;
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'参数代码'
,
key
:
'code'
,
dataIndex
:
'code'
},
{
title
:
'参数值'
,
key
:
'value'
,
dataIndex
:
'value'
},
{
title
:
'参数描述'
,
key
:
'describe'
,
dataIndex
:
'describe'
},
{
title
:
'操作'
,
key
:
'options'
,
dataIndex
:
'options'
,
render
:
(
text
:
any
,
record
:
any
,
index
:
number
)
=>
<>
<
Button
type=
'link'
onClick=
{
()
=>
{
setedit
(
record
);
setmodalvisible
(
true
);
setModifyIndex
(
index
);
setmodify
(
true
)
}
}
>
编辑
</
Button
>
<
Button
type=
'link'
onClick=
{
()
=>
onDel
(
record
.
type
,
index
)
}
>
删除
</
Button
>
</>
}
]
const
handleOk
=
(
value
:
any
,
idx
:
number
)
=>
{
let
idType
:
number
=
1
;
switch
(
type
)
{
case
1
:
idType
=
1
break
;
case
2
:
idType
=
3
break
;
case
3
:
idType
=
2
break
;
}
if
(
!
modify
)
{
onGet
(
value
,
idType
)
}
else
{
onEdit
(
value
,
idType
,
modifyIndex
)
}
setedit
({});
setmodalvisible
(
false
);
}
return
(
<>
{
visible
&&
<>
<
div
style=
{
{
borderLeft
:
'2px solid #00B37A'
,
margin
:
'41px 0 8px'
,
padding
:
'1px 5px'
}
}
>
{
name
}
参数配置
</
div
>
<
Table
columns=
{
columns
}
dataSource=
{
payParametersListResponses
}
rowKey=
{
(
record
:
any
,
index
:
number
)
=>
index
}
pagination=
{
false
}
/>
<
Button
style=
{
{
marginBottom
:
16
,
marginTop
:
24
}
}
block
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
{
setmodalvisible
(
true
);
setType
(
id
);
setmodify
(
false
)
}
}
type=
'dashed'
>
新增参数配置
</
Button
>
{
id
!==
2
&&
<>
<
div
style=
{
{
borderLeft
:
'2px solid #00B37A'
,
margin
:
'41px 0 8px'
,
padding
:
'1px 5px'
}
}
>
{
name
}
转账到银行卡参数配置
</
div
>
<
Table
columns=
{
columns
}
dataSource=
{
payParametersList
}
rowKey=
{
(
record
:
any
,
index
:
number
)
=>
index
}
pagination=
{
false
}
/>
<
Button
style=
{
{
marginBottom
:
16
,
marginTop
:
24
}
}
block
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
{
setmodalvisible
(
true
);
setType
(
3
);
setmodify
(
false
)
}
}
type=
'dashed'
>
新增参数配置
</
Button
>
</>
}
</>
}
<
SetUpModal
onType=
{
onType
}
type=
{
type
}
modalvisible=
{
modalvisible
}
edit=
{
edit
}
onOK=
{
(
value
)
=>
handleOk
(
value
,
type
)
}
onCancel=
{
()
=>
setmodalvisible
(
false
)
}
/>
</>
)
}
export
default
PayWayTable
;
src/pages/ruleSettingManage/paySetting/components/setUpModal.tsx
0 → 100644
View file @
4dfcd1e8
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Modal
,
Form
,
Select
,
Input
}
from
'antd'
;
import
usePayTypeEnum
from
'./usePayTypeEnum'
;
const
{
Option
}
=
Select
;
const
{
TextArea
}
=
Input
;
interface
setUpModalParams
{
type
?:
number
,
modalvisible
?:
boolean
,
onOK
:
Function
,
onCancel
:
Function
,
onType
?:
number
,
edit
?:
any
}
const
layout
:
any
=
{
colon
:
false
,
labelCol
:
{
style
:
{
width
:
'100px'
}
},
labelAlign
:
"left"
};
const
SetUpModal
:
React
.
FC
<
setUpModalParams
>
=
(
props
)
=>
{
const
[
form
]
=
Form
.
useForm
();
const
{
payTypeEnum
}
=
usePayTypeEnum
();
const
{
modalvisible
,
onOK
,
onCancel
,
type
,
edit
}
=
props
;
const
[
option
,
setOption
]
=
useState
<
any
>
({})
const
handleOk
=
()
=>
{
form
.
validateFields
().
then
(
res
=>
{
console
.
log
(
type
)
let
idType
:
number
=
1
;
switch
(
type
)
{
case
1
:
idType
=
1
break
;
case
2
:
idType
=
3
break
;
case
3
:
idType
=
2
break
;
}
const
obj
=
{
id
:
edit
.
id
?
edit
.
id
:
undefined
,
code
:
option
.
children
?
option
.
children
:
edit
.
code
,
value
:
res
.
value
,
describe
:
res
.
describe
,
type
:
idType
,
payWayCodeTypeEnum
:
res
.
code
}
onOK
(
obj
)
form
.
resetFields
();
}).
catch
(
error
=>
{
console
.
log
(
error
)
})
}
const
handleChange
=
(
e
:
any
,
option
:
any
)
=>
{
setOption
(
option
)
}
useEffect
(()
=>
{
if
(
Object
.
keys
(
edit
).
length
>
0
)
{
console
.
log
(
edit
,
10086
)
form
.
setFieldsValue
({
code
:
edit
.
payWayCodeTypeEnum
,
value
:
edit
.
value
,
describe
:
edit
.
describe
})
}
},
[
edit
])
return
(
<
Modal
width=
{
576
}
title=
'新增参数配置'
visible=
{
modalvisible
}
onOk=
{
handleOk
}
onCancel=
{
()
=>
onCancel
()
}
>
<
Form
form=
{
form
}
{
...
layout
}
>
<
Form
.
Item
name=
'code'
label=
'参数代码'
rules=
{
[{
required
:
true
,
message
:
'请选择参数代码'
}]
}
>
<
Select
onChange=
{
handleChange
}
>
{
payTypeEnum
.
map
(
item
=>
(
<
Option
key=
{
item
.
value
}
payWayCodeTypeEnum=
{
item
.
value
}
value=
{
item
.
value
}
>
{
item
.
label
}
</
Option
>
))
}
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
name=
'value'
label=
'参数值'
rules=
{
[{
required
:
true
,
message
:
'请输入参数值'
}]
}
>
<
Input
/>
</
Form
.
Item
>
<
Form
.
Item
name=
'describe'
label=
'参数描述'
>
<
TextArea
rows=
{
4
}
/>
</
Form
.
Item
>
</
Form
>
</
Modal
>
)
}
export
default
SetUpModal
;
src/pages/ruleSettingManage/paySetting/components/usePayTypeEnum.ts
0 → 100644
View file @
4dfcd1e8
import
{
PublicApi
}
from
'@/services/api'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
const
usePayTypeEnum
=
()
=>
{
const
[
payTypeEnum
,
setPayTypeEnum
]
=
useState
<
any
>
([])
const
ref
=
useRef
(
payTypeEnum
);
useEffect
(()
=>
{
const
getPayWayType
=
async
()
=>
{
await
PublicApi
.
getPayGetPayWayCodeTypeEnum
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
const
{
data
}
=
res
;
const
payWay
:
any
[]
=
[]
data
.
forEach
(
v
=>
{
payWay
.
push
({
label
:
v
.
name
,
value
:
v
.
type
})
})
ref
.
current
=
payWay
setPayTypeEnum
(
ref
.
current
)
}
})
}
getPayWayType
();
},[])
return
{
payTypeEnum
};
}
export
default
usePayTypeEnum
;
src/pages/ruleSettingManage/paySetting/index.less
0 → 100644
View file @
4dfcd1e8
.radio-group-box {
.ant-radio-button-wrapper {
width: 80px !important;
text-align: center;
}
}
src/pages/ruleSettingManage/paySetting/index.tsx
View file @
4dfcd1e8
...
...
@@ -39,7 +39,7 @@ const PaySetting: React.FC<{}> = () => {
}
const
handleModalOK
=
(
obj
:
any
)
=>
{
console
.
log
(
'选项卡:'
,
exportId
(),
'弹窗id:'
,
type
)
setvisible
(
false
)
currentTab
=
!
exportId
()
?
1
:
exportId
()
console
.
log
(
'选项卡:'
,
exportId
(),
'数据'
,
obj
)
...
...
@@ -62,7 +62,7 @@ const PaySetting: React.FC<{}> = () => {
//微信
if
(
type
==
3
){
let
list
:
any
=
[]
list
.
push
(
obj
)
let
old
=
payActions
.
getFieldValue
(
"payParametersListResponses2"
)
...
...
@@ -137,7 +137,7 @@ const PaySetting: React.FC<{}> = () => {
list
=
[...
payParametersListResponses
]
}
console
.
log
(
list
)
// return
// return
PublicApi
.
postPayCollectionParametersAdd
({
payWayId
:
currentTab
,
isPitchOn
:
values
.
isPitchOn
,
...
...
@@ -183,4 +183,4 @@ const PaySetting: React.FC<{}> = () => {
</
PageHeaderWrapper
>
)
}
export
default
PaySetting
\ No newline at end of file
export
default
PaySetting
src/pages/ruleSettingManage/paySetting/settingIndex.tsx
View file @
4dfcd1e8
This diff is collapsed.
Click to expand it.
src/pages/ruleSettingManage/payStrategy/index.tsx
View file @
4dfcd1e8
...
...
@@ -18,11 +18,15 @@ import {FORM_FILTER_PATH} from '@/formSchema/const'
import
{
SaveOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
import
{
strategySearch
}
from
'../schema'
import
{
PublicApi
}
from
'@/services/api'
import
moment
from
'moment'
;
const
formActions
=
createFormActions
()
interface
searchType
{
name
:
string
}
const
List
:
React
.
FC
<
{}
>
=
()
=>
{
const
format
=
(
text
)
=>
{
return
<>
{
moment
(
text
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
</>
}
const
ref
=
useRef
<
any
>
({})
const
[
searchParams
,
setsearchParams
]
=
useState
<
searchType
>
({
name
:
''
...
...
@@ -49,6 +53,7 @@ const List: React.FC<{}> = () => {
title
:
'操作时间'
,
dataIndex
:
'operationTime'
,
key
:
'operationTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
format
(
text
)),
align
:
'center'
},
{
...
...
@@ -88,7 +93,7 @@ const List: React.FC<{}> = () => {
)
}
}
]
const
handleModify
=
async
(
record
:
any
)
=>
{
await
PublicApi
.
postPayPaymentPolicyUpdateState
({
...
...
@@ -127,7 +132,7 @@ const List: React.FC<{}> = () => {
layouts
:{
order
:
2
},
children
:
children
:
<
Button
type=
"primary"
onClick=
{
handleToAdd
}
...
...
@@ -160,4 +165,4 @@ const List: React.FC<{}> = () => {
</
Card
>
)
}
export
default
List
\ No newline at end of file
export
default
List
src/pages/ruleSettingManage/platformSettlementStrategy/list/index.tsx
View file @
4dfcd1e8
...
...
@@ -4,7 +4,7 @@
*/
import
React
,
{
useRef
}
from
'react'
;
import
{
Card
,
Button
}
from
'antd'
;
import
{
Card
,
Button
,
Space
}
from
'antd'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
StandardTable
}
from
'god'
;
import
{
PublicApi
}
from
'@/services/api'
;
...
...
@@ -75,12 +75,24 @@ const MemberSettle: React.FC<{}> = () => {
return
null
}
return
(
<
Link
to=
{
`/ruleSettingManager/platformSettlementStrategy/edit?id=${record.id}`
}
>
修改
</
Link
>
<
Space
>
<
Link
to=
{
`/ruleSettingManager/platformSettlementStrategy/edit?id=${record.id}`
}
>
修改
</
Link
>
<
Button
type=
"link"
onClick=
{
()
=>
handleRemove
({
id
:
record
.
id
})
}
>
删除
</
Button
>
</
Space
>
)
}
},
]
const
handleRemove
=
(
params
)
=>
{
PublicApi
.
postSettleAccountsPlatformConfigDeletePlatformSettlementStrategy
(
params
)
.
then
(({
data
,
code
})
=>
{
if
(
code
===
1000
)
{
formActions
.
submit
();
}
})
}
const
goToCreate
=
()
=>
{
history
.
push
(
'/ruleSettingManager/platformSettlementStrategy/add'
);
}
...
...
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