Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
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-platform
Commits
d85c30c3
Commit
d85c30c3
authored
Oct 30, 2020
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接结算能力完成
parent
7f749d46
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
385 additions
and
129 deletions
+385
-129
balanceRoute.ts
config/routes/balanceRoute.ts
+5
-3
index.tsx
src/pages/balance/accountsPayable/settlementList/index.tsx
+3
-2
index.tsx
...pages/balance/accountsReceivable/settlementList/index.tsx
+3
-1
InvoiceDrawer.tsx
src/pages/balance/components/InvoiceCreate/InvoiceDrawer.tsx
+8
-1
index.tsx
src/pages/balance/components/StatusActions/index.tsx
+25
-4
index.tsx
...es/balance/platformSettlement/accountReceivable/index.tsx
+26
-10
info.tsx
...ges/balance/platformSettlement/accountReceivable/info.tsx
+72
-21
index.tsx
...nce/platformSettlement/accountReceivable/schema/index.tsx
+36
-15
index.tsx
src/pages/balance/platformSettlement/integral/index.tsx
+84
-27
info.tsx
src/pages/balance/platformSettlement/integral/info.tsx
+72
-20
index.tsx
...ages/balance/platformSettlement/integral/schema/index.tsx
+51
-25
No files found.
config/routes/balanceRoute.ts
View file @
d85c30c3
...
...
@@ -7,7 +7,7 @@
/*
* @Author: Bill
* @Date: 2020-10-12 09:45:20
* @LastEditTime: 2020-10-
27 14:53:56
* @LastEditTime: 2020-10-
30 15:51:10
* @Description: 加工能力路由
*/
...
...
@@ -97,7 +97,8 @@ const HandlingRoute = {
path
:
'/memberCenter/balance/platformSettlement/accountReceivable/detail'
,
name
:
'accountReceivableInfo'
,
icon
:
'smile'
,
component
:
'@/pages/balance/platformSettlement/accountReceivable/info'
component
:
'@/pages/balance/platformSettlement/accountReceivable/info'
,
hideInMenu
:
true
,
},
// 平台结算管理 -> 积分结算列表页
{
...
...
@@ -111,7 +112,8 @@ const HandlingRoute = {
path
:
'/memberCenter/balance/platformSettlement/integral/detail'
,
name
:
'integralInfo'
,
icon
:
'smile'
,
component
:
'@/pages/balance/platformSettlement/integral/info'
component
:
'@/pages/balance/platformSettlement/integral/info'
,
hideInMenu
:
true
,
}
]
},
...
...
src/pages/balance/accountsPayable/settlementList/index.tsx
View file @
d85c30c3
...
...
@@ -22,7 +22,8 @@ import { Moment } from 'moment';
import
{
payStatus
}
from
'../../common'
;
const
formActions
=
createFormActions
();
// 应付账款 - 付款方查看凭证, 能力中心
const
PAYABLE_PAYER
=
1
;
interface
SearchParams
{
settlementName
?:
string
,
payName
?:
string
,
...
...
@@ -95,7 +96,7 @@ const SettlementList = () => {
excludes=
{
[
1
,
3
]
}
settlementId=
{
record
.
memberId
||
1
}
handleUpload=
{
handleUploadVoucher
}
type=
{
1
}
type=
{
PAYABLE_PAYER
}
/>
)
}
...
...
src/pages/balance/accountsReceivable/settlementList/index.tsx
View file @
d85c30c3
...
...
@@ -21,6 +21,8 @@ import EyePreview from '@/components/EyePreview';
import
{
payStatus
}
from
'../../common'
;
const
formActions
=
createFormActions
();
// 应收账款管理-收款方查看凭证, 能力中心
const
RECEIABLE_BENEFICIARY
=
2
;
const
SettlementList
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
...
...
@@ -73,7 +75,7 @@ const SettlementList = () => {
<
StatusActions
excludes=
{
[
2
]
}
id=
{
record
.
id
}
type=
{
2
}
type=
{
RECEIABLE_BENEFICIARY
}
status=
{
record
.
status
}
settlementDate=
{
record
.
settlementDate
}
payName=
{
record
.
payName
}
...
...
src/pages/balance/components/InvoiceCreate/InvoiceDrawer.tsx
View file @
d85c30c3
...
...
@@ -5,7 +5,7 @@
*/
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Drawer
,
Input
,
DatePicker
}
from
'antd'
;
import
{
Drawer
,
Input
,
DatePicker
,
message
}
from
'antd'
;
import
InvoiceInfo
from
'./InvoiceInfo'
;
import
{
SchemaForm
,
...
...
@@ -61,6 +61,13 @@ const InvoiceDrawer: React.FC<Iprops> = (props) => {
onCancel
();
return
;
}
if
(
typeof
value
.
list
===
'undefined'
||
value
.
list
.
length
==
0
)
{
message
.
error
({
content
:
'请添加发票信息'
})
return
;
}
const
{
kindName
,
typeName
,
...
rest
}
=
invoiceInfo
const
proveList
=
value
.
list
.
map
((
item
)
=>
{
return
{
number
:
item
.
number
,
remark
:
item
.
remark
,
invoiceDate
:
item
.
invoiceDate
.
format
(
'YYYY-MM-DD'
)}
})
const
postData
=
{
...
...
src/pages/balance/components/StatusActions/index.tsx
View file @
d85c30c3
...
...
@@ -27,6 +27,19 @@ interface Iprops {
handleUpload
?:
(
params
:
any
)
=>
void
,
// 上传凭证
}
// 应付账款 - 付款方查看凭证, 能力中心
const
PAYABLE_PAYER
=
1
;
// 应收账款管理-收款方查看凭证, 能力中心
const
RECEIABLE_BENEFICIARY
=
2
;
// 平台代收账款结算 - 收款方查看凭证 能力中心
const
PLATFORM_BENEFICIARY
=
3
;
// 平台代收账款结算 - 付款方查看凭证 这是平台后台
const
PLATFORM_PAYER
=
4
;
// 平台积分结算-收款方查看凭证, 能力中心
const
SCORE_BENEFINCIARY
=
5
;
// 平台积分结算-付款方查看凭证 , 这是平台后天
const
SCORE_PAYER
=
6
;
// 显示确认对账
const
ConfirmAccountComponent
:
React
.
FC
<
Iprops
>
=
(
props
)
=>
{
const
{
settlementDate
,
payName
}
=
props
;
...
...
@@ -90,12 +103,20 @@ const ConfirmCollected = (props) => {
const
WrapVoucher
=
({
id
,
type
})
=>
{
const
[
files
,
setFiles
]
=
useState
([]);
const
SERVICES_MAP
=
{
// /settle/accounts/member/settlement/getPayablePayProve
[
PAYABLE_PAYER
]:
PublicApi
.
getSettleAccountsMemberSettlementGetPayablePayProve
,
[
RECEIABLE_BENEFICIARY
]:
PublicApi
.
getSettleAccountsMemberSettlementGetReceivablePayProve
,
///settle/accounts/platform/settlement/getReceivablePayProve
[
PLATFORM_BENEFICIARY
]:
PublicApi
.
getSettleAccountsPlatformSettlementGetReceivablePayProve
,
[
PLATFORM_PAYER
]:
PublicApi
.
getSettleAccountsPlatformSettlementGetPayablePayProve
,
// /settle/accounts/platform/score/settlement/getReceivablePayProve
[
SCORE_BENEFINCIARY
]:
PublicApi
.
getSettleAccountsPlatformScoreSettlementGetReceivablePayProve
,
[
SCORE_PAYER
]:
PublicApi
.
getSettleAccountsPlatformScoreSettlementGetPayablePayProve
}
useEffect
(()
=>
{
if
(
id
)
{
const
service
=
type
==
1
?
PublicApi
.
getSettleAccountsMemberSettlementGetPayablePayProve
:
PublicApi
.
getSettleAccountsMemberSettlementGetReceivablePayProve
const
service
=
SERVICES_MAP
[
type
];
service
({
id
}).
then
((
data
)
=>
{
if
(
data
.
code
==
1000
)
{
...
...
src/pages/balance/platformSettlement/accountReceivable/index.tsx
View file @
d85c30c3
...
...
@@ -6,10 +6,10 @@
import
React
,
{
useRef
}
from
'react'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
Card
,
Button
,
DatePicker
,
Tag
,
Modal
,
Space
}
from
'antd'
;
import
{
Card
,
DatePicker
}
from
'antd'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
ISchema
,
createFormActions
}
from
'@formily/antd'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
StandardTable
}
from
'god'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
;
...
...
@@ -18,22 +18,37 @@ import StatusTag from '../../components/StatusTag';
import
StatusActions
from
'../../components/StatusActions'
;
import
{
payStatus
}
from
'../../common'
;
import
{
PublicApi
}
from
'@/services/api'
import
EyePreview
from
'@/components/EyePreview'
import
{
text
}
from
'express'
;
const
formActions
=
createFormActions
();
// 平台代收账款结算 - 收款方查看凭证 能力中心
const
PLATFORM_BENEFICIARY
=
3
;
const
AccountReceivable
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
fetchListData
=
async
(
params
)
=>
{
const
searchData
=
{
status
:
0
,
...
params
...
params
,
status
:
typeof
params
.
status
==
'undefined'
?
0
:
params
.
status
,
}
///settle/accounts/platform/settlement/pageReceivableSettlement
const
{
data
}
=
await
PublicApi
.
getSettleAccountsPlatformSettlementPageReceivableSettlement
(
searchData
);
return
data
}
const
columns
=
[
{
title
:
'结算单号'
,
dataIndex
:
'settlementNo'
},
{
title
:
'结算单号'
,
dataIndex
:
'settlementNo'
,
render
:
(
text
,
record
)
=>
{
return
(
<
EyePreview
url=
{
`/memberCenter/balance/platformSettlement/accountReceivable/detail?id=${record.id}`
}
>
{
record
.
settlementNo
}
</
EyePreview
>
)
}
},
{
title
:
'结算日期'
,
dataIndex
:
'settlementDate'
},
{
title
:
'结算方式'
,
dataIndex
:
'settlementWayName'
},
{
title
:
'总单数'
,
dataIndex
:
'totalCount'
},
...
...
@@ -59,7 +74,7 @@ const AccountReceivable = () => {
<
StatusActions
excludes=
{
[
2
]
}
id=
{
record
.
id
}
type=
{
2
}
type=
{
PLATFORM_BENEFICIARY
}
status=
{
record
.
status
}
settlementDate=
{
record
.
settlementDate
}
payName=
{
"平台"
}
...
...
@@ -78,8 +93,8 @@ const AccountReceivable = () => {
* @param {cancel: function, id: number} cancel 为关闭回调函数
*/
const
handleConfirm
=
(
params
:
any
)
=>
{
///settle/accounts/platform/settlement/confirmAccountComplete
PublicApi
.
postSettleAccounts
Member
SettlementConfirmAccountComplete
({
settlementId
:
params
.
id
})
//
/settle/accounts/platform/settlement/confirmAccountComplete
PublicApi
.
postSettleAccounts
Platform
SettlementConfirmAccountComplete
({
settlementId
:
params
.
id
})
.
then
((
data
)
=>
{
if
(
data
.
code
===
1000
)
{
params
.
onCancel
();
...
...
@@ -93,7 +108,7 @@ const AccountReceivable = () => {
* @param {onCancel:function, id: number, status: number}
*/
const
handleComfirmInCompletePayment
=
(
params
:
any
)
=>
{
PublicApi
.
postSettleAccounts
Member
SettlementConfirmPayProve
({
id
:
params
.
id
,
status
:
params
.
status
})
PublicApi
.
postSettleAccounts
Platform
SettlementConfirmPayProve
({
id
:
params
.
id
,
status
:
params
.
status
})
.
then
((
data
)
=>
{
if
(
data
.
code
===
1000
)
{
formActions
.
submit
();
...
...
@@ -107,7 +122,8 @@ const AccountReceivable = () => {
* @param {onCancel:function, id: number, status: number}
*/
const
handleComfirmCompletePayment
=
(
params
:
any
)
=>
{
PublicApi
.
postSettleAccountsMemberSettlementConfirmPayProve
({
id
:
params
.
id
,
status
:
params
.
status
})
///settle/accounts/platform/settlement/confirmPayProve
PublicApi
.
postSettleAccountsPlatformSettlementConfirmPayProve
({
id
:
params
.
id
,
status
:
params
.
status
})
.
then
((
data
)
=>
{
if
(
data
.
code
===
1000
)
{
formActions
.
submit
();
...
...
src/pages/balance/platformSettlement/accountReceivable/info.tsx
View file @
d85c30c3
...
...
@@ -4,7 +4,7 @@
* @Description: 平台代收账款结算详情
*/
import
React
,
{
useRef
}
from
'react'
;
import
React
,
{
useRef
,
useEffect
,
useState
}
from
'react'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
Card
,
PageHeader
,
Descriptions
,
Button
}
from
'antd'
;
import
{
history
}
from
'umi'
;
...
...
@@ -16,29 +16,78 @@ import { StandardTable } from 'god';
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
;
import
{
detailSchema
}
from
'./schema'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
StatusTag
from
'../../components/StatusTag'
;
import
{
timeRange
}
from
'@/utils/index'
;
import
moment
from
'moment'
;
const
formActions
=
createFormActions
();
const
columns
=
[
{
title
:
'单据号'
,
dataIndex
:
'
n
o'
},
{
title
:
'单据摘要'
,
dataIndex
:
'
desc
'
},
{
title
:
'单据类型'
,
dataIndex
:
'
typ
e'
},
{
title
:
'单据时间'
,
dataIndex
:
'
t
ime'
},
{
title
:
'订单类型'
,
dataIndex
:
'orderType'
},
{
title
:
'单据总额'
,
dataIndex
:
'
total
'
},
{
title
:
'代收金额'
,
dataIndex
:
'
price
'
},
{
title
:
'单据号'
,
dataIndex
:
'
orderN
o'
},
{
title
:
'单据摘要'
,
dataIndex
:
'
orderAbstract
'
},
{
title
:
'单据类型'
,
dataIndex
:
'
settlementOrderTypeNam
e'
},
{
title
:
'单据时间'
,
dataIndex
:
'
orderT
ime'
},
{
title
:
'订单类型'
,
dataIndex
:
'orderType
Name
'
},
{
title
:
'单据总额'
,
dataIndex
:
'
orderAmount
'
},
{
title
:
'代收金额'
,
dataIndex
:
'
collectAmount
'
},
{
title
:
'支付时间'
,
dataIndex
:
'payTime'
},
{
title
:
'佣金比例'
,
dataIndex
:
'percent'
},
{
title
:
'扣减佣金'
,
dataIndex
:
'koujian'
},
{
title
:
'本期结余额'
,
dataIndex
:
'rest'
}
{
title
:
'佣金比例'
,
dataIndex
:
'ratio'
,
render
:
(
text
,
record
)
=>
{
return
record
.
ratio
+
"%"
}
},
{
title
:
'扣减佣金'
,
dataIndex
:
'brokerage'
},
{
title
:
'本期结余额'
,
dataIndex
:
'settlementAmount'
}
]
const
Info
:
React
.
FC
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
const
[
infoDetail
,
setInfoDetail
]
=
useState
<
any
>
(
null
);
const
{
id
,
preview
}
=
usePageStatus
();
const
fetchListData
=
async
(
params
)
=>
{
return
{}
const
postData
=
{
settlementId
:
id
,
...
params
}
///settle/accounts/platform/settlement/pageReceivableSettlementDetail
const
res
=
await
PublicApi
.
getSettleAccountsPlatformSettlementPageReceivableSettlementDetail
(
postData
)
return
res
.
data
}
useEffect
(()
=>
{
if
(
id
)
{
// 获取详情
async
function
fetchDetail
()
{
const
{
data
,
code
}
=
await
PublicApi
.
getSettleAccountsPlatformSettlementGetReceivableDetail
({
id
})
if
(
code
==
1000
)
{
setInfoDetail
(
data
);
}
}
fetchDetail
();
}
},
[
id
])
/**
* 搜索
*/
const
handleSearch
=
(
values
)
=>
{
console
.
log
(
values
);
const
format
=
'YYYY-MM-DD'
const
{
payTime
,
orderTime
,
...
rest
}
=
values
;
const
payTimeRange
=
payTime
?
timeRange
(
values
.
payTime
):
null
;
const
payStartTime
=
payTimeRange
?
moment
(
payTimeRange
.
st
).
format
(
format
)
:
null
;
const
payEndTime
=
payTimeRange
?
moment
(
payTimeRange
.
et
).
format
(
format
)
:
null
;
const
orderTimeRange
=
orderTime
?
timeRange
(
values
.
orderTime
)
:
null
;
const
orderStartTime
=
orderTimeRange
?
moment
(
orderTimeRange
.
st
).
format
(
format
)
:
null
;
const
orderEndTime
=
orderTimeRange
?
moment
(
orderTimeRange
.
et
).
format
(
format
)
:
null
;
ref
.
current
.
reload
({...
rest
,
payStartTime
,
payEndTime
,
orderStartTime
,
orderEndTime
});
}
return
(
<
PageHeaderWrapper
title=
{
...
...
@@ -53,7 +102,7 @@ const Info: React.FC = () => {
name
:
"结算单号:"
}
}
extra=
{
(
<
span
style=
{
{
fontSize
:
12
,
fontWeight
:
'normal'
}
}
>
{
"TPTY12"
}
</
span
>
<
span
style=
{
{
fontSize
:
12
,
fontWeight
:
'normal'
}
}
>
{
infoDetail
?.
settlementNo
}
</
span
>
)
}
/>
}
...
...
@@ -64,11 +113,13 @@ const Info: React.FC = () => {
padding
:
'0 32px'
,
}
}
>
<
Descriptions
.
Item
label=
"结算日期:"
>
{
"2020-08-25"
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"结算单数:"
>
{
"1,238"
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"结算金额:"
>
{
"¥668,684,59"
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"结算方式:"
>
{
"月结"
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"外部状态:"
>
{
"待对账"
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"结算日期:"
>
{
infoDetail
?.
settlementDate
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"结算单数:"
>
{
infoDetail
?.
totalCount
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"结算金额:"
>
¥
{
infoDetail
?.
amount
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"结算方式:"
>
{
infoDetail
?.
settlementWayName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"外部状态:"
>
<
StatusTag
text=
{
infoDetail
?.
statusName
}
/>
</
Descriptions
.
Item
>
</
Descriptions
>
</
PageHeader
>
</>
...
...
@@ -77,7 +128,7 @@ const Info: React.FC = () => {
<
Card
>
<
StandardTable
tableProps=
{
{
rowKey
:
'id'
,
rowKey
:
record
=>
(
`${record.orderNo}-${record.payTime}`
)
,
}
}
columns=
{
columns
}
currentRef=
{
ref
}
...
...
@@ -93,14 +144,14 @@ const Info: React.FC = () => {
)
}
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'megaLayout.topLayout.
search
'
,
FORM_FILTER_PATH
);
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'megaLayout.topLayout.
orderNo
'
,
FORM_FILTER_PATH
);
// useAsyncInitSelect(
// ['innerStatus', 'outerStatus'],
// fetchSelectOptions,
// );
}
}
schema=
{
detailSchema
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
onSubmit=
{
handleSearch
}
/>
}
/>
...
...
src/pages/balance/platformSettlement/accountReceivable/schema/index.tsx
View file @
d85c30c3
...
...
@@ -80,6 +80,19 @@ export const schema: ISchema = {
* 平台代收账款结算--详情
*/
export
const
commonTimeList
=
[
{
label
:
'今天'
,
value
:
1
},
{
label
:
'一周内'
,
value
:
2
},
{
label
:
'一个月内'
,
value
:
3
},
{
label
:
'三个月内'
,
value
:
4
},
{
label
:
'六个月内'
,
value
:
5
},
{
label
:
'一年内'
,
value
:
6
},
{
label
:
'一年前'
,
value
:
7
}
];
const
orderTime
=
[{
label
:
'下单时间(所有)'
,
value
:
0
}].
concat
(
commonTimeList
);
const
payTime
=
[{
label
:
'支付时间(所有)'
,
value
:
0
}].
concat
(
commonTimeList
);
export
const
detailSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
...
...
@@ -101,11 +114,11 @@ export const detailSchema: ISchema = {
children
:
'{{exportBtn}}'
,
},
},
search
:
{
orderNo
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索'
,
placeholder
:
'搜索
(单据号)
'
,
},
},
},
...
...
@@ -119,32 +132,40 @@ export const detailSchema: ISchema = {
},
},
properties
:
{
orderAbstract
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'单据摘要'
}
},
orderTime
:
{
type
:
'string'
,
enum
:
[],
enum
:
orderTime
,
default
:
0
,
'x-component-props'
:
{
placeholder
:
'
加工企业名称
(全部)'
,
placeholder
:
'
下单时间
(全部)'
,
allowClear
:
true
,
},
},
payTime
:
{
type
:
'string'
,
enum
:
[],
enum
:
payTime
,
default
:
0
,
'x-component-props'
:
{
placeholder
:
'
加工企业名称
(全部)'
,
placeholder
:
'
支付时间
(全部)'
,
allowClear
:
true
,
},
},
//
submit: {
//
'x-component': 'Submit',
//
'x-mega-props': {
//
span: 1,
//
},
//
'x-component-props': {
//
children: '查询',
//
},
//
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
},
},
},
},
},
...
...
src/pages/balance/platformSettlement/integral/index.tsx
View file @
d85c30c3
...
...
@@ -6,7 +6,7 @@
import
React
,
{
useRef
}
from
'react'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
Card
,
Button
,
Modal
,
Tag
,
Space
,
DatePicker
}
from
'antd'
;
import
{
Card
,
DatePicker
}
from
'antd'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
createFormActions
}
from
'@formily/antd'
;
...
...
@@ -17,26 +17,49 @@ import { schema } from './schema/index';
import
StatusActions
from
'../../components/StatusActions'
;
import
StatusTag
from
'../../components/StatusTag'
;
import
{
payStatus
}
from
'../../common'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
EyePreview
from
'@/components/EyePreview'
;
// 平台积分结算-收款方查看凭证, 能力中心
const
SCORE_BENEFINCIARY
=
5
;
const
formActions
=
createFormActions
();
const
Integral
:
React
.
FC
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
fetchListData
=
async
(
params
)
=>
{
return
{
data
:
[{
id
:
1
}]
,
totalCount
:
1
const
searchData
=
{
...
params
,
status
:
typeof
params
.
status
==
'undefined'
?
0
:
params
.
status
,
}
// /settle/accounts/platform/score/settlement/pageReceivableSettlement
const
{
data
}
=
await
PublicApi
.
getSettleAccountsPlatformScoreSettlementPageReceivableSettlement
(
searchData
);
return
data
}
const
columns
=
[
{
title
:
'结算单号'
,
dataIndex
:
'num'
},
{
title
:
'结算日期'
,
dataIndex
:
'num'
},
{
title
:
'结算方式'
,
dataIndex
:
'num'
},
{
title
:
'总单数'
,
dataIndex
:
'num'
},
{
title
:
'代收金额'
,
dataIndex
:
'num'
},
{
title
:
'佣金'
,
dataIndex
:
'num'
},
{
title
:
'结算金额'
,
dataIndex
:
'num'
},
{
title
:
'结算日期'
,
dataIndex
:
'num'
},
{
title
:
'支付方式'
,
dataIndex
:
'payMethod'
},
{
title
:
'结算单号'
,
dataIndex
:
'settlementNo'
,
render
:
(
text
,
record
)
=>
{
return
(
<
EyePreview
url=
{
`/memberCenter/balance/platformSettlement/integral/detail?id=${record.id}`
}
>
{
record
.
settlementNo
}
</
EyePreview
>
)
}
},
{
title
:
'结算日期'
,
dataIndex
:
'settlementDate'
},
{
title
:
'结算方式'
,
dataIndex
:
'settlementWayName'
},
{
title
:
'总单数'
,
dataIndex
:
'totalCount'
},
{
title
:
'结算积分总数'
,
dataIndex
:
'score'
},
{
title
:
'兑换比率'
,
dataIndex
:
'ratio'
,
render
:
(
text
,
record
)
=>
{
return
(
record
.
ratio
*
100
+
"%"
);
}
},
{
title
:
'结算金额'
,
dataIndex
:
'amount'
},
{
title
:
'结算时间'
,
dataIndex
:
'settlementTime'
},
{
title
:
'支付方式'
,
dataIndex
:
'payWayName'
},
{
title
:
'结算状态'
,
dataIndex
:
'status'
,
filters
:
payStatus
,
...
...
@@ -55,10 +78,10 @@ const Integral: React.FC = () => {
<
StatusActions
excludes=
{
[
2
]
}
id=
{
record
.
id
}
type=
{
2
}
type=
{
SCORE_BENEFINCIARY
}
status=
{
record
.
status
}
settlementDate=
{
record
.
settlementDate
}
payName=
{
record
.
payName
}
payName=
{
"平台"
}
handleReconciledComfirm=
{
handleConfirm
}
handleComfirmInCompletePayment=
{
handleComfirmInCompletePayment
}
handleComfirmCompletePayment=
{
handleComfirmCompletePayment
}
...
...
@@ -71,20 +94,58 @@ const Integral: React.FC = () => {
/**
* 确认对账
* @param
cancel
关闭回调函数
* @param
{cancel: function, id: number} cancel 为
关闭回调函数
*/
const
handleConfirm
=
(
params
)
=>
{
console
.
log
(
123
)
params
.
cancel
();
const
handleConfirm
=
(
params
:
any
)
=>
{
///settle/accounts/platform/settlement/confirmAccountComplete
// /settle/accounts/platform/score/settlement/confirmAccountComplete
PublicApi
.
postSettleAccountsPlatformScoreSettlementConfirmAccountComplete
({
settlementId
:
params
.
id
})
.
then
((
data
)
=>
{
if
(
data
.
code
===
1000
)
{
params
.
onCancel
();
formActions
.
submit
();
}
})
}
/**
* 确认未到款
* @param {onCancel:function, id: number, status: number}
*/
const
handleComfirmInCompletePayment
=
(
params
:
any
)
=>
{
console
.
log
(
params
);
params
.
onCancel
()
// /settle/accounts/platform/score/settlement/confirmPayProve
PublicApi
.
postSettleAccountsPlatformScoreSettlementConfirmPayProve
({
id
:
params
.
id
,
status
:
params
.
status
})
.
then
((
data
)
=>
{
if
(
data
.
code
===
1000
)
{
formActions
.
submit
();
params
.
onCancel
();
}
})
}
/**
* 确认到款
* @param {onCancel:function, id: number, status: number}
*/
const
handleComfirmCompletePayment
=
(
params
:
any
)
=>
{
params
.
onCancel
();
PublicApi
.
postSettleAccountsPlatformScoreSettlementConfirmPayProve
({
id
:
params
.
id
,
status
:
params
.
status
})
.
then
((
data
)
=>
{
if
(
data
.
code
===
1000
)
{
formActions
.
submit
();
params
.
onCancel
();
}
})
}
/**
* 搜索
*/
const
handleSearch
=
(
values
:
any
)
=>
{
const
format
=
'YYYY-MM-DD'
const
startTime
=
values
.
startTime
?.
format
(
format
);
const
endTime
=
values
.
endTime
?.
format
(
format
);
ref
.
current
.
reload
({...
values
,
startTime
,
endTime
});
}
return
(
<
PageHeaderWrapper
>
<
Card
>
...
...
@@ -102,13 +163,9 @@ const Integral: React.FC = () => {
expressionScope=
{
{}
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'megaLayout.name'
,
FORM_FILTER_PATH
);
// useAsyncInitSelect(
// ['innerStatus', 'outerStatus'],
// fetchSelectOptions,
// );
}
}
schema=
{
schema
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
onSubmit=
{
handleSearch
}
/>
}
/>
...
...
src/pages/balance/platformSettlement/integral/info.tsx
View file @
d85c30c3
...
...
@@ -4,7 +4,7 @@
* @Description: 积分结算详情页
*/
import
React
,
{
useRef
}
from
'react'
;
import
React
,
{
useRef
,
useState
,
useEffect
}
from
'react'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
Card
,
PageHeader
,
Descriptions
,
Button
}
from
'antd'
;
import
{
history
}
from
'umi'
;
...
...
@@ -16,27 +16,77 @@ import { StandardTable } from 'god';
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
;
import
{
detailSchema
}
from
'./schema'
;
import
{
timeRange
}
from
'@/utils/index'
;
import
moment
from
'moment'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
StatusTag
from
'../../components/StatusTag'
;
const
formActions
=
createFormActions
();
const
columns
=
[
{
title
:
'单据号'
,
dataIndex
:
'
n
o'
},
{
title
:
'单据摘要'
,
dataIndex
:
'
desc
'
},
{
title
:
'单据类型'
,
dataIndex
:
'
typ
e'
},
{
title
:
'单据时间'
,
dataIndex
:
'
t
ime'
},
{
title
:
'订单类型'
,
dataIndex
:
'orderType'
},
{
title
:
'
单据总额'
,
dataIndex
:
'total
'
},
{
title
:
'
代收金额'
,
dataIndex
:
'pric
e'
},
{
title
:
'单据号'
,
dataIndex
:
'
orderN
o'
},
{
title
:
'单据摘要'
,
dataIndex
:
'
orderAbstract
'
},
{
title
:
'单据类型'
,
dataIndex
:
'
settlementOrderTypeNam
e'
},
{
title
:
'单据时间'
,
dataIndex
:
'
orderT
ime'
},
{
title
:
'订单类型'
,
dataIndex
:
'orderType
Name
'
},
{
title
:
'
所需积分'
,
dataIndex
:
'orderScore
'
},
{
title
:
'
支付积分'
,
dataIndex
:
'payScor
e'
},
{
title
:
'支付时间'
,
dataIndex
:
'payTime'
},
{
title
:
'佣金比例'
,
dataIndex
:
'percent'
},
{
title
:
'扣减佣金'
,
dataIndex
:
'koujian'
},
{
title
:
'本期结余额'
,
dataIndex
:
'rest'
}
{
title
:
'兑换比率'
,
dataIndex
:
'ratio'
,
render
:
(
text
,
record
)
=>
{
return
record
.
ratio
*
100
+
"%"
}
},
{
title
:
'本期结余额'
,
dataIndex
:
'settlementAmount'
}
]
const
Info
:
React
.
FC
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
const
[
infoDetail
,
setInfoDetail
]
=
useState
<
any
>
(
null
);
const
{
id
,
preview
}
=
usePageStatus
();
const
fetchListData
=
async
(
params
)
=>
{
return
{}
const
postData
=
{
settlementId
:
id
,
...
params
}
const
res
=
await
PublicApi
.
getSettleAccountsPlatformScoreSettlementPageReceivableSettlementDetail
(
postData
)
return
res
.
data
}
useEffect
(()
=>
{
if
(
id
)
{
// 获取详情
async
function
fetchDetail
()
{
const
{
data
,
code
}
=
await
PublicApi
.
getSettleAccountsPlatformScoreSettlementGetReceivableDetail
({
id
})
if
(
code
==
1000
)
{
setInfoDetail
(
data
);
}
}
fetchDetail
();
}
},
[
id
])
/**
* 搜索
*/
const
handleSearch
=
(
values
)
=>
{
console
.
log
(
values
);
const
format
=
'YYYY-MM-DD'
const
{
payTime
,
orderTime
,
...
rest
}
=
values
;
const
payTimeRange
=
payTime
?
timeRange
(
values
.
payTime
):
null
;
const
payStartTime
=
payTimeRange
?
moment
(
payTimeRange
.
st
).
format
(
format
)
:
null
;
const
payEndTime
=
payTimeRange
?
moment
(
payTimeRange
.
et
).
format
(
format
)
:
null
;
const
orderTimeRange
=
orderTime
?
timeRange
(
values
.
orderTime
)
:
null
;
const
orderStartTime
=
orderTimeRange
?
moment
(
orderTimeRange
.
st
).
format
(
format
)
:
null
;
const
orderEndTime
=
orderTimeRange
?
moment
(
orderTimeRange
.
et
).
format
(
format
)
:
null
;
ref
.
current
.
reload
({...
rest
,
payStartTime
,
payEndTime
,
orderStartTime
,
orderEndTime
});
}
return
(
<
PageHeaderWrapper
title=
{
...
...
@@ -62,11 +112,13 @@ const Info: React.FC = () => {
padding
:
'0 32px'
,
}
}
>
<
Descriptions
.
Item
label=
"结算日期:"
>
{
"2020-08-25"
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"结算单数:"
>
{
"1,238"
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"结算金额:"
>
{
"¥668,684,59"
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"结算方式:"
>
{
"月结"
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"外部状态:"
>
{
"待对账"
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"结算日期:"
>
{
infoDetail
?.
settlementDate
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"结算单数:"
>
{
infoDetail
?.
totalCount
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"结算金额:"
>
¥
{
infoDetail
?.
amount
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"结算方式:"
>
{
infoDetail
?.
settlementWayName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"外部状态:"
>
<
StatusTag
text=
{
infoDetail
?.
statusName
}
/>
</
Descriptions
.
Item
>
</
Descriptions
>
</
PageHeader
>
</>
...
...
@@ -75,7 +127,7 @@ const Info: React.FC = () => {
<
Card
>
<
StandardTable
tableProps=
{
{
rowKey
:
'id'
,
rowKey
:
record
=>
(
`${record.orderNo}-${record.payTime}`
)
,
}
}
columns=
{
columns
}
currentRef=
{
ref
}
...
...
@@ -91,14 +143,14 @@ const Info: React.FC = () => {
)
}
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'megaLayout.topLayout.
search
'
,
FORM_FILTER_PATH
);
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'megaLayout.topLayout.
orderNo
'
,
FORM_FILTER_PATH
);
// useAsyncInitSelect(
// ['innerStatus', 'outerStatus'],
// fetchSelectOptions,
// );
}
}
schema=
{
detailSchema
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
onSubmit=
{
handleSearch
}
/>
}
/>
...
...
src/pages/balance/platformSettlement/integral/schema/index.tsx
View file @
d85c30c3
...
...
@@ -52,21 +52,28 @@ export const schema: ISchema = {
},
status
:
{
type
:
'string'
,
enum
:
[],
enum
:
[
{
label
:
'结算状态(全部)'
,
value
:
0
},
{
label
:
'待对账'
,
value
:
1
},
{
label
:
'待付款'
,
value
:
2
},
{
label
:
'待收款'
,
value
:
3
},
{
label
:
'待完成'
,
value
:
4
},
],
'x-component-props'
:
{
placeholder
:
'结算状态(全部)'
,
allowClear
:
true
,
},
default
:
0
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
},
},
// submit: {
// 'x-component': 'Submit',
// 'x-mega-props': {
// span: 1,
// },
// 'x-component-props': {
// children: '查询',
// },
// },
},
},
},
...
...
@@ -77,6 +84,17 @@ export const schema: ISchema = {
/**
* 平台积分结算- 平台积分结算明细
*/
export
const
commonTimeList
=
[
{
label
:
'今天'
,
value
:
1
},
{
label
:
'一周内'
,
value
:
2
},
{
label
:
'一个月内'
,
value
:
3
},
{
label
:
'三个月内'
,
value
:
4
},
{
label
:
'六个月内'
,
value
:
5
},
{
label
:
'一年内'
,
value
:
6
},
{
label
:
'一年前'
,
value
:
7
}
];
const
orderTime
=
[{
label
:
'下单时间(所有)'
,
value
:
0
}].
concat
(
commonTimeList
);
const
payTime
=
[{
label
:
'支付时间(所有)'
,
value
:
0
}].
concat
(
commonTimeList
);
export
const
detailSchema
:
ISchema
=
{
type
:
'object'
,
...
...
@@ -99,11 +117,11 @@ export const detailSchema: ISchema = {
children
:
'{{exportBtn}}'
,
},
},
search
:
{
orderNo
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索'
,
placeholder
:
'搜索
(单据号)
'
,
},
},
},
...
...
@@ -117,31 +135,39 @@ export const detailSchema: ISchema = {
},
},
properties
:
{
orderAbstract
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'单据摘要'
}
},
orderTime
:
{
type
:
'string'
,
enum
:
[],
enum
:
orderTime
,
default
:
0
,
'x-component-props'
:
{
placeholder
:
'
加工企业名称
(全部)'
,
placeholder
:
'
下单时间
(全部)'
,
allowClear
:
true
,
},
},
payTime
:
{
type
:
'string'
,
enum
:
[],
enum
:
payTime
,
default
:
0
,
'x-component-props'
:
{
placeholder
:
'
加工企业名称
(全部)'
,
placeholder
:
'
支付时间
(全部)'
,
allowClear
:
true
,
},
},
//
submit: {
//
'x-component': 'Submit',
//
'x-mega-props': {
//
span: 1,
//
},
//
'x-component-props': {
//
children: '查询',
//
},
//
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
},
},
},
},
},
...
...
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