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
黄庭坚
jinfa-platform
Commits
f36253a4
Commit
f36253a4
authored
Jan 07, 2022
by
卢均锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 业务请款&业务请款协同完成
parent
2f992165
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
447 additions
and
103 deletions
+447
-103
balanceRoute.ts
config/routes/balanceRoute.ts
+26
-0
add.tsx
src/pages/balance/businessRequestFunds/admin/add.tsx
+0
-0
index.tsx
src/pages/balance/businessRequestFunds/admin/index.tsx
+9
-5
index.tsx
.../businessRequestFunds/components/contractDrawer/index.tsx
+89
-29
index.tsx
...inessRequestFunds/components/requestFundsDrawer/index.tsx
+56
-39
index.tsx
src/pages/balance/businessRequestFunds/detail/index.tsx
+17
-6
index.tsx
src/pages/balance/businessRequestFunds/search/index.tsx
+7
-7
index.tsx
...alance/businessRequestFundsCollaboration/detail/index.tsx
+223
-0
index.tsx
...alance/businessRequestFundsCollaboration/search/index.tsx
+7
-8
index.tsx
src/pages/balance/components/WriteOffDrawer/index.tsx
+13
-9
No files found.
config/routes/balanceRoute.ts
View file @
f36253a4
...
...
@@ -442,6 +442,32 @@ const BalancedRoute = {
},
],
},
// 业务请款协同
{
path
:
'/memberCenter/balance/businessRequestFundsCollaboration'
,
relationParentCode
:
'balance'
,
name
:
'业务请款协同'
,
routes
:
[
{
path
:
'/memberCenter/balance/businessRequestFundsCollaboration/search'
,
component
:
'@/pages/balance/businessRequestFundsCollaboration/search'
,
relationParentCode
:
'balance'
,
name
:
'请款单查询'
,
icon
:
'smile'
,
},
{
hideInMenu
:
true
,
path
:
'/memberCenter/balance/businessRequestFundsCollaboration/search/preview'
,
component
:
'@/pages/balance/businessRequestFundsCollaboration/detail'
,
relationParentCode
:
'balance'
,
name
:
'请款单详情'
,
icon
:
'smile'
,
noMargin
:
true
,
},
],
},
],
};
...
...
src/pages/balance/businessRequestFunds/admin/add.tsx
View file @
f36253a4
This diff is collapsed.
Click to expand it.
src/pages/balance/businessRequestFunds/admin/index.tsx
View file @
f36253a4
...
...
@@ -54,8 +54,8 @@ const Admin: React.FC = () => {
)
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.qingkuanleixing'
}),
key
:
'applyType'
,
dataIndex
:
'applyType'
,
key
:
'applyType
Name
'
,
dataIndex
:
'applyType
Name
'
,
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.qingkuanfang'
}),
key
:
'payee'
,
...
...
@@ -80,8 +80,8 @@ const Admin: React.FC = () => {
width
:
180
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.waibuzhuangtai'
}),
key
:
'status'
,
dataIndex
:
'status'
,
key
:
'status
Name
'
,
dataIndex
:
'status
Name
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
StatusTag
type=
'default'
title=
{
text
}
/>
},
{
...
...
@@ -127,7 +127,11 @@ const Admin: React.FC = () => {
const
handleMenuClick
=
(
e
:
any
,
record
:
any
)
=>
{
if
(
e
.
key
===
'1'
)
{
history
.
push
(
`/memberCenter/balance/businessRequestFunds/admin/edit?id=
${
record
.
id
}
&no=
${
record
.
applyNo
}
`
)
if
(
record
.
applyType
===
1
){
history
.
push
(
`/memberCenter/balance/businessRequestFunds/admin/fundsEdit?id=
${
record
.
id
}
&no=
${
record
.
applyNo
}
`
)
}
else
{
history
.
push
(
`/memberCenter/balance/businessRequestFunds/admin/edit?id=
${
record
.
id
}
&no=
${
record
.
applyNo
}
`
)
}
}
}
...
...
src/pages/balance/businessRequestFunds/components/contractDrawer/index.tsx
View file @
f36253a4
...
...
@@ -5,59 +5,119 @@ import StandardTable from '@/components/StandardTable';
import
{
createFormActions
}
from
'@formily/antd'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
// import { getSettleAccountsBusinessReconciliationToReconciliationList } from '@/services/SettleV2Api'
import
{
priceFormat
}
from
'@/utils/numberFomat'
;
import
{
getSettleAccountsBusinessApplyAmountFindApplyAmountRosSourceContracts
}
from
'@/services/SettleV2Api'
import
Submit
from
'@/components/NiceForm/components/Submit'
import
NiceForm
from
'@/components/NiceForm'
import
{
getIntl
}
from
'umi'
;
interface
ContractDrawerProps
{
visible
:
boolean
,
partyBMemberId
?:
number
,
partyBRoleId
?:
number
,
onClose
?:
()
=>
void
,
onOk
?:
(
rows
:
any
[])
=>
void
}
const
intl
=
getIntl
();
const
formActions
=
createFormActions
();
const
ContractDrawer
:
React
.
FC
<
ContractDrawerProps
>
=
(
props
:
ContractDrawerProps
)
=>
{
const
{
visible
,
onClose
}
=
props
;
const
{
visible
,
partyBMemberId
,
partyBRoleId
,
onClose
,
onOk
}
=
props
;
const
ref
=
useRef
<
any
>
({})
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
any
>
([])
const
[
selectedRows
,
setSelectedRows
]
=
useState
<
any
>
([])
const
loadingTableData
=
async
(
params
)
=>
{
const
_params
=
{
...
params
}
const
{
data
}
=
await
getSettleAccountsBusiness
ReconciliationToReconciliationList
(
_params
)
const
_params
=
{
...
params
,
partyBMemberId
,
partyBRoleId
}
const
{
data
}
=
await
getSettleAccountsBusiness
ApplyAmountFindApplyAmountRosSourceContracts
(
_params
)
return
data
;
}
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'合同编号'
,
key
:
'
memberId
'
,
dataIndex
:
'
memberId
'
,
key
:
'
billNo
'
,
dataIndex
:
'
billNo
'
,
},
{
title
:
'合同摘要'
,
key
:
'
memberName
'
,
dataIndex
:
'
memberName
'
,
key
:
'
billAbstract
'
,
dataIndex
:
'
billAbstract
'
,
},
{
title
:
'合同生效时间'
,
key
:
'
memberTyp
e'
,
dataIndex
:
'
memberTyp
e'
,
key
:
'
billTim
e'
,
dataIndex
:
'
billTim
e'
,
},
{
title
:
'合同失效时间'
,
key
:
'memberRole'
,
dataIndex
:
'memberRole'
,
key
:
'billEndTime'
,
dataIndex
:
'billEndTime'
,
},
{
title
:
'含税/税率'
,
key
:
'taxRate'
,
dataIndex
:
'taxRate'
,
width
:
150
,
render
:
(
text
:
any
)
=>
{
return
text
>
0
?
`是/
${
text
}
%`
:
'否'
;
}
},
{
title
:
'合同金额'
,
key
:
'memberLevel'
,
dataIndex
:
'memberLevel'
,
key
:
'billAmount'
,
dataIndex
:
'billAmount'
,
render
:
(
text
:
any
)
=>
`¥
${
priceFormat
(
text
)}
`
},
{
title
:
'合同剩余金额'
,
key
:
'memberLevel'
,
dataIndex
:
'memberLevel'
,
key
:
'remainAmount'
,
dataIndex
:
'remainAmount'
,
render
:
(
text
:
any
)
=>
`¥
${
priceFormat
(
text
)}
`
}];
const
handleSelectChange
=
(
record
,
selected
,
selectedRow
,
nativeEvent
)
=>
{
setSelectedRowKeys
([
record
.
id
]);
let
childArr
=
[...
selectedRowKeys
];
let
childRowArr
=
[...
selectedRows
]
if
(
selected
)
{
childArr
.
push
(
record
.
billId
);
childRowArr
.
push
(
record
);
}
else
{
childArr
.
splice
(
childArr
.
findIndex
((
item
)
=>
item
===
record
.
billId
),
1
);
childRowArr
.
splice
(
childRowArr
.
findIndex
((
item
)
=>
item
.
billId
===
record
.
billId
),
1
);
}
setSelectedRowKeys
(
childArr
)
setSelectedRows
(
childRowArr
)
};
const
handleSelectAll
=
(
selected
,
selectedRow
,
changeRows
)
=>
{
let
childArr
=
[...
selectedRowKeys
];
let
childRowArr
=
[...
selectedRows
];
if
(
selected
)
{
childArr
=
Array
.
from
(
new
Set
([...
childArr
,
...
changeRows
.
map
((
item
)
=>
item
.
billId
)])
);
childRowArr
=
Array
.
from
(
new
Set
([...
childRowArr
,
...
changeRows
])
);
}
else
{
childArr
=
childArr
.
filter
(
(
item
)
=>
!
changeRows
.
some
((
e
)
=>
e
.
billId
===
item
)
);
childRowArr
=
childRowArr
.
filter
(
(
item
)
=>
!
changeRows
.
some
((
e
)
=>
e
.
billId
===
item
.
billId
)
);
}
setSelectedRowKeys
(
childArr
);
setSelectedRows
(
childRowArr
);
}
const
_onOk
=
()
=>
{
const
_rows
=
[...
selectedRows
]
setSelectedRows
([])
setSelectedRowKeys
([])
onOk
?.(
_rows
);
}
return
(
<
Drawer
...
...
@@ -65,14 +125,14 @@ const ContractDrawer: React.FC<ContractDrawerProps> = (props: ContractDrawerProp
placement=
{
'right'
}
onClose=
{
onClose
}
visible=
{
visible
}
key=
{
'right'
}
key=
{
`contract_${partyBMemberId}`
}
width=
{
'80%'
}
footer=
{
<
div
style=
{
{
textAlign
:
'right'
}
}
>
<
Button
onClick=
{
onClose
}
style=
{
{
marginRight
:
8
}
}
>
{
intl
.
formatMessage
({
id
:
'balance.quxiao'
})
}
</
Button
>
<
Button
onClick=
{
onClose
}
type=
"primary"
>
<
Button
onClick=
{
_onOk
}
type=
"primary"
>
{
'确定'
}
</
Button
>
</
div
>
...
...
@@ -80,14 +140,14 @@ const ContractDrawer: React.FC<ContractDrawerProps> = (props: ContractDrawerProp
>
<
StandardTable
keepAlive=
{
false
}
//
fetchTableData={params => loadingTableData(params)}
fetchTableData=
{
params
=>
loadingTableData
(
params
)
}
columns=
{
columns
}
currentRef=
{
ref
}
rowKey=
"
i
d"
rowKey=
"
billI
d"
rowSelection=
{
{
type
:
'radio'
,
selectedRowKeys
:
selectedRowKeys
,
onSelect
:
handleSelectChange
,
onSelectAll
:
handleSelectAll
,
}
}
controlRender=
{
<
NiceForm
...
...
@@ -97,7 +157,7 @@ const ContractDrawer: React.FC<ContractDrawerProps> = (props: ContractDrawerProp
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'
apply
No'
,
'
contract
No'
,
FORM_FILTER_PATH
,
)
}
}
...
...
@@ -111,11 +171,11 @@ const ContractDrawer: React.FC<ContractDrawerProps> = (props: ContractDrawerProp
grid
:
true
},
properties
:
{
memberName
:
{
contractNo
:
{
type
:
'string'
,
"x-component"
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'请输入
会员名称
'
,
placeholder
:
'请输入
合同编号
'
,
align
:
'flex-start'
,
},
},
...
...
@@ -134,18 +194,18 @@ const ContractDrawer: React.FC<ContractDrawerProps> = (props: ContractDrawerProp
},
},
properties
:
{
"
apply
Abstract"
:
{
"
contract
Abstract"
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshuruqingkuandanzhaiyao'
})
,
placeholder
:
'请输入合同摘要'
,
allowClear
:
true
,
}
},
"[
expectPayTimeStart,expectPayTimeEnd
]"
:
{
"[
startTime,endTime
]"
:
{
type
:
'string'
,
"x-component"
:
"daterange"
,
"x-component-props"
:
{
placeholder
:
[
intl
.
formatMessage
({
id
:
'balance.yujifukuankaishishijian'
}),
intl
.
formatMessage
({
id
:
'balance.yujifukuanjieshushijian'
})
],
placeholder
:
[
'合同开始时间'
,
'合同结束时间'
],
allowClear
:
true
,
}
},
...
...
src/pages/balance/businessRequestFunds/components/requestFundsDrawer/index.tsx
View file @
f36253a4
...
...
@@ -5,58 +5,66 @@ import StandardTable from '@/components/StandardTable';
import
{
createFormActions
}
from
'@formily/antd'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
// import { getOrderCommonSettleBuyerOrderPage } from '@/services/OrderNewV2Api'
import
{
getAuth
}
from
'@/utils/auth'
import
{
priceFormat
}
from
'@/utils/numberFomat'
;
import
{
getSettleAccountsBusinessApplyAmountFindApplyAmountRosSourceOrders
}
from
'@/services/SettleV2Api'
import
Submit
from
'@/components/NiceForm/components/Submit'
import
NiceForm
from
'@/components/NiceForm'
import
{
getIntl
}
from
'umi'
;
interface
RequestFundsDrawerProps
{
visible
:
boolean
,
applyType
:
number
,
onClose
?:
()
=>
void
,
onOk
?:
(
rows
:
any
[])
=>
void
}
const
intl
=
getIntl
();
const
formActions
=
createFormActions
();
const
RequestFundsDrawer
:
React
.
FC
<
RequestFundsDrawerProps
>
=
(
props
:
RequestFundsDrawerProps
)
=>
{
const
{
visible
,
onClose
}
=
props
;
const
{
visible
,
applyType
,
onClose
,
onOk
}
=
props
;
const
ref
=
useRef
<
any
>
({})
const
{
memberId
,
memberRoleId
}
=
(
getAuth
()
||
{})
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
any
>
([])
const
[
selectedRow
,
setSelectedRow
]
=
useState
<
any
>
([])
const
[
selectedRow
s
,
setSelectedRows
]
=
useState
<
any
>
([])
const
loadingTableData
=
async
(
params
)
=>
{
const
_params
=
{
...
params
}
const
{
data
}
=
await
get
OrderCommonSettleBuyerOrderPage
(
_params
)
const
_params
=
{
...
params
,
orderType
:
applyType
,
buyerMemberId
:
memberId
,
buyerRoleId
:
memberRoleId
}
const
{
data
}
=
await
get
SettleAccountsBusinessApplyAmountFindApplyAmountRosSourceOrders
(
_params
)
return
data
;
}
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'单据号'
,
key
:
'
order
No'
,
dataIndex
:
'
order
No'
,
key
:
'
bill
No'
,
dataIndex
:
'
bill
No'
,
},
{
title
:
'单据摘要'
,
key
:
'
diges
t'
,
dataIndex
:
'
diges
t'
,
key
:
'
billAbstrac
t'
,
dataIndex
:
'
billAbstrac
t'
,
},
{
title
:
'单据类型'
,
key
:
'
memberTyp
e'
,
dataIndex
:
'
memberTyp
e'
,
key
:
'
billTypeNam
e'
,
dataIndex
:
'
billTypeNam
e'
,
},
{
title
:
'单据时间'
,
key
:
'
create
Time'
,
dataIndex
:
'
create
Time'
,
key
:
'
bill
Time'
,
dataIndex
:
'
bill
Time'
,
},
{
title
:
'单据状态'
,
key
:
'
memberLevel
'
,
dataIndex
:
'
memberLevel
'
,
key
:
'
billStatus
'
,
dataIndex
:
'
billStatus
'
,
},
{
title
:
'单据金额'
,
key
:
'memberLevel'
,
dataIndex
:
'memberLevel'
,
key
:
'billAmount'
,
dataIndex
:
'billAmount'
,
render
:
(
text
:
any
)
=>
`¥
${
priceFormat
(
text
)}
`
},
{
title
:
'已付款'
,
key
:
'memberLevel'
,
dataIndex
:
'memberLevel'
,
key
:
'paid'
,
dataIndex
:
'paid'
,
render
:
(
text
:
any
)
=>
`¥
${
priceFormat
(
text
)}
`
},
{
title
:
'含税/税率'
,
key
:
'taxRate'
,
...
...
@@ -67,54 +75,63 @@ const RequestFundsDrawer: React.FC<RequestFundsDrawerProps> = (props: RequestFun
}
},
{
title
:
'已请款待付款'
,
key
:
'memberLevel'
,
dataIndex
:
'memberLevel'
,
key
:
'appliedUnpaid'
,
dataIndex
:
'appliedUnpaid'
,
render
:
(
text
:
any
)
=>
`¥
${
priceFormat
(
text
)}
`
},
{
title
:
'待请款'
,
key
:
'memberLevel'
,
dataIndex
:
'memberLevel'
,
key
:
'applyPayment'
,
dataIndex
:
'applyPayment'
,
render
:
(
text
:
any
)
=>
`¥
${
priceFormat
(
text
)}
`
}];
const
handleSelectChange
=
(
record
,
selected
,
selectedRow
,
nativeEvent
)
=>
{
let
childArr
=
[...
selectedRowKeys
];
let
childRowArr
=
[...
selectedRow
]
let
childRowArr
=
[...
selectedRow
s
]
if
(
selected
)
{
childArr
.
push
(
record
.
product
Id
);
childArr
.
push
(
record
.
bill
Id
);
childRowArr
.
push
(
record
);
}
else
{
childArr
.
splice
(
childArr
.
findIndex
((
item
)
=>
item
===
record
.
order
Id
),
childArr
.
findIndex
((
item
)
=>
item
===
record
.
bill
Id
),
1
);
childRowArr
.
splice
(
childRowArr
.
findIndex
((
item
)
=>
item
.
orderId
===
record
.
order
Id
),
childRowArr
.
findIndex
((
item
)
=>
item
.
billId
===
record
.
bill
Id
),
1
);
}
setSelectedRowKeys
(
childArr
)
setSelectedRow
(
childRowArr
)
setSelectedRow
s
(
childRowArr
)
};
const
handleSelectAll
=
(
selected
,
selectedRow
,
changeRows
)
=>
{
let
childArr
=
[...
selectedRowKeys
];
let
childRowArr
=
[...
selectedRow
];
let
childRowArr
=
[...
selectedRow
s
];
if
(
selected
)
{
childArr
=
Array
.
from
(
new
Set
([...
childArr
,
...
changeRows
.
map
((
item
)
=>
item
.
order
Id
)])
new
Set
([...
childArr
,
...
changeRows
.
map
((
item
)
=>
item
.
bill
Id
)])
);
childRowArr
=
Array
.
from
(
new
Set
([...
childRowArr
,
...
changeRows
])
);
}
else
{
childArr
=
childArr
.
filter
(
(
item
)
=>
!
changeRows
.
some
((
e
)
=>
e
.
order
Id
===
item
)
(
item
)
=>
!
changeRows
.
some
((
e
)
=>
e
.
bill
Id
===
item
)
);
childRowArr
=
childRowArr
.
filter
(
(
item
)
=>
!
changeRows
.
some
((
e
)
=>
e
.
orderId
===
item
.
order
Id
)
(
item
)
=>
!
changeRows
.
some
((
e
)
=>
e
.
billId
===
item
.
bill
Id
)
);
}
setSelectedRow
(
childRowArr
)
setSelectedRowKeys
(
childArr
);
setSelectedRows
(
childRowArr
)
}
const
_onOk
=
()
=>
{
const
_rows
=
[...
selectedRows
]
setSelectedRows
([])
setSelectedRowKeys
([])
onOk
?.(
_rows
);
}
...
...
@@ -124,14 +141,14 @@ const RequestFundsDrawer: React.FC<RequestFundsDrawerProps> = (props: RequestFun
placement=
{
'right'
}
onClose=
{
onClose
}
visible=
{
visible
}
key=
{
'right'
}
key=
{
`requestFunds_${applyType}`
}
width=
{
'80%'
}
footer=
{
<
div
style=
{
{
textAlign
:
'right'
}
}
>
<
Button
onClick=
{
onClose
}
style=
{
{
marginRight
:
8
}
}
>
{
intl
.
formatMessage
({
id
:
'balance.quxiao'
})
}
</
Button
>
<
Button
onClick=
{
onClose
}
type=
"primary"
>
<
Button
onClick=
{
_onOk
}
type=
"primary"
>
{
'确定'
}
</
Button
>
</
div
>
...
...
@@ -139,10 +156,10 @@ const RequestFundsDrawer: React.FC<RequestFundsDrawerProps> = (props: RequestFun
>
<
StandardTable
keepAlive=
{
false
}
//
fetchTableData={params => loadingTableData(params)}
fetchTableData=
{
params
=>
loadingTableData
(
params
)
}
columns=
{
columns
}
currentRef=
{
ref
}
rowKey=
"
order
Id"
rowKey=
"
bill
Id"
rowSelection=
{
{
selectedRowKeys
:
selectedRowKeys
,
onSelect
:
handleSelectChange
,
...
...
@@ -156,7 +173,7 @@ const RequestFundsDrawer: React.FC<RequestFundsDrawerProps> = (props: RequestFun
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'order
Id
'
,
'order
No
'
,
FORM_FILTER_PATH
,
)
}
}
...
...
@@ -170,7 +187,7 @@ const RequestFundsDrawer: React.FC<RequestFundsDrawerProps> = (props: RequestFun
grid
:
true
},
properties
:
{
memberName
:
{
orderNo
:
{
type
:
'string'
,
"x-component"
:
'Search'
,
'x-component-props'
:
{
...
...
src/pages/balance/businessRequestFunds/detail/index.tsx
View file @
f36253a4
...
...
@@ -19,7 +19,7 @@ import WriteOffDrawer from '../../components/WriteOffDrawer'
const
intl
=
getIntl
();
const
TABLINK
=
[
{
id
:
'basicLayout'
,
title
:
intl
.
formatMessage
({
id
:
'balance.jibenxinxi'
})
},
{
id
:
'billLayout'
,
title
:
intl
.
formatMessage
({
id
:
'balance.duizhangdanmingxi'
})
},
{
id
:
'billLayout'
,
title
:
'请款明细'
},
]
const
SearchDetail
=
()
=>
{
...
...
@@ -64,7 +64,7 @@ const SearchDetail = () => {
{
label
:
'请款类型'
,
extra
:
data
.
applyTypeName
,
type
:
'text'
},
{
label
:
'支付方式'
,
extra
:
data
.
moneyPayWayName
,
type
:
'text'
},
{
label
:
'请款备注'
,
extra
:
data
.
remark
,
type
:
'text'
},
{
label
:
'对账单号'
,
extra
:
<
Link
to=
{
`/memberCenter/balance/businessReconciliation/search/preview?id=${data.reconciliationId}&no=${data.reconciliationNo}`
}
>
{
data
.
reconciliationNo
}
</
Link
>
,
type
:
'text'
},
{
label
:
'对账单号'
,
extra
:
data
?.
reconciliationNo
?
<
Link
to=
{
`/memberCenter/balance/businessReconciliation/search/preview?id=${data.reconciliationId}&no=${data.reconciliationNo}`
}
>
{
data
.
reconciliationNo
}
</
Link
>
:
'-'
,
type
:
'text'
},
{
label
:
'发票号码'
,
extra
:
'40122826 (2020-08-25)'
,
type
:
'text'
},
{
label
:
'状态'
,
extra
:
<
StatusTag
type=
'primary'
title=
{
data
.
statusName
}
/>,
type
:
'text'
},
{
label
:
'单据时间'
,
extra
:
data
.
createTime
,
type
:
'text'
},
...
...
@@ -97,11 +97,22 @@ const SearchDetail = () => {
_getDetail
()
},
[])
const
_handleOpen
=
(
record
:
any
)
=>
{
if
(
record
.
billType
===
1
)
{
window
.
open
(
`/memberCenter/tranactionAbility/purchaseOrder/orderList/preview?id=
${
record
.
billId
}
`
)
}
else
if
(
record
.
billType
===
2
)
{
window
.
open
(
`/memberCenter/contract/manage/QueryList/QueryListdetails?contractId=
${
record
.
billId
}
`
)
}
else
{
window
.
open
(
`/memberCenter/afterService/returnApplication/returnQuery/detail?id=
${
record
.
billId
}
`
)
}
}
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'单据号'
,
key
:
'billNo'
,
dataIndex
:
'billNo'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Button
type=
'link'
onClick=
{
()
=>
{
_handleOpen
(
record
)}
}
>
{
text
}
</
Button
>
},
{
title
:
'单据摘要'
,
...
...
@@ -110,8 +121,8 @@ const SearchDetail = () => {
},
{
title
:
'单据类型'
,
key
:
'billType'
,
dataIndex
:
'billType'
,
key
:
'billType
Name
'
,
dataIndex
:
'billType
Name
'
,
},
{
title
:
'单据时间'
,
...
...
@@ -166,13 +177,13 @@ const SearchDetail = () => {
title
:
'核销金额'
,
key
:
'writeOffAmount'
,
dataIndex
:
'writeOffAmount'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Button
type=
'link'
onClick=
{
()
=>
{
_openWriteOff
(
record
)
}
}
>
¥ $
{
priceFormat
(
text
)
}
</
Button
>
render
:
(
text
:
any
,
record
:
any
)
=>
text
>
0
&&
<
Button
type=
'link'
onClick=
{
()
=>
{
_openWriteOff
(
record
)
}
}
>
¥ $
{
priceFormat
(
text
)
}
</
Button
>
},
{
title
:
'可核销金额'
,
key
:
'canWriteOffAmount'
,
dataIndex
:
'canWriteOffAmount'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Button
type=
'link'
onClick=
{
()
=>
{
_openWriteOff
(
record
)
}
}
>
¥ $
{
priceFormat
(
text
)
}
</
Button
>
render
:
(
text
:
any
,
record
:
any
)
=>
text
>
0
&&
<
Button
type=
'link'
onClick=
{
()
=>
{
_openWriteOff
(
record
)
}
}
>
¥ $
{
priceFormat
(
text
)
}
</
Button
>
},
];
...
...
src/pages/balance/businessRequestFunds/search/index.tsx
View file @
f36253a4
import
React
,
{
useRef
,
useState
}
from
'react'
import
{
Card
,
Typography
,
Space
,
Button
}
from
'antd'
import
React
,
{
useRef
}
from
'react'
import
{
Card
,
Typography
,
Space
}
from
'antd'
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
StandardTable
from
'@/components/StandardTable'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
...
...
@@ -57,8 +57,8 @@ const Search: React.FC = () => {
)
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.qingkuanleixing'
}),
key
:
'applyType'
,
dataIndex
:
'applyType'
,
key
:
'applyType
Name
'
,
dataIndex
:
'applyType
Name
'
,
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.qingkuanfang'
}),
key
:
'payee'
,
...
...
@@ -83,9 +83,9 @@ const Search: React.FC = () => {
width
:
180
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.waibuzhuangtai'
}),
key
:
'status'
,
dataIndex
:
'status'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
StatusTag
type=
'default'
title=
{
record
.
status
}
/>
key
:
'status
Name
'
,
dataIndex
:
'status
Name
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
StatusTag
type=
'default'
title=
{
text
}
/>
}];
return
(
...
...
src/pages/balance/businessRequestFundsCollaboration/detail/index.tsx
0 → 100644
View file @
f36253a4
import
React
,
{
Fragment
,
useEffect
,
useState
,
useMemo
,
useRef
}
from
'react'
;
import
{
Button
}
from
'antd'
;
import
{
getIntl
,
history
,
Link
}
from
'umi'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
StandardTable
}
from
'@linkseeks/god'
;
import
{
formatTimeString
}
from
'@/utils'
import
{
priceFormat
}
from
'@/utils/numberFomat'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
PeripheralLayout
from
'@/pages/transaction/purchaseAbility/components/detail'
;
import
Card
from
'@/pages/transaction/purchaseAbility/components/card'
;
import
CommonLayout
from
'@/pages/transaction/purchaseAbility/components/detail/components/bidCommonLayout'
;
import
{
getSettleAccountsBusinessApplyAmountDetailApplyAmount
,
getSettleAccountsBusinessApplyAmountApplyAmountRowList
}
from
'@/services/SettleV2Api'
import
WriteOffDrawer
from
'../../components/WriteOffDrawer'
const
intl
=
getIntl
();
const
TABLINK
=
[
{
id
:
'basicLayout'
,
title
:
intl
.
formatMessage
({
id
:
'balance.jibenxinxi'
})
},
{
id
:
'billLayout'
,
title
:
'请款明细'
},
]
const
SearchDetail
=
()
=>
{
const
{
query
:
{
id
,
no
},
pathname
,
}
=
history
.
location
;
const
[
pathPci
]
=
useState
(
pathname
.
split
(
'/'
)[
pathname
.
split
(
'/'
).
length
-
2
]);
const
[
path
]
=
useState
(
pathname
.
split
(
'/'
)[
pathname
.
split
(
'/'
).
length
-
1
]);
const
[
writeOffVisible
,
setWriteOffVisible
]
=
useState
<
any
>
(
false
);
const
[
dataSource
,
setDataSource
]
=
useState
<
any
>
({});
const
currentRef
=
useRef
({});
const
[
basicEffect
,
setBasicEffect
]
=
useState
<
any
>
([]);
const
[
writeOffRecord
,
setWriteOffRecord
]
=
useState
<
any
>
({});
const
_tabs
=
useMemo
(()
=>
{
let
_list
=
[];
TABLINK
.
forEach
((
item
)
=>
{
_list
.
push
(
item
)
})
return
_list
;
},
[
pathPci
])
const
_getDetail
=
()
=>
{
const
_params
:
any
=
{
applyAmountId
:
id
,
applyNo
:
no
}
getSettleAccountsBusinessApplyAmountDetailApplyAmount
(
_params
).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
const
data
=
res
.
data
;
setDataSource
(
data
);
setBasicEffect
(
[
{
col
:
[
{
label
:
'请款单号'
,
extra
:
data
.
applyNo
,
type
:
'text'
},
{
label
:
'请款摘要'
,
extra
:
data
.
applyAbstract
,
type
:
'text'
},
{
label
:
'请款类型'
,
extra
:
data
.
applyTypeName
,
type
:
'text'
},
{
label
:
'支付方式'
,
extra
:
data
.
moneyPayWayName
,
type
:
'text'
},
{
label
:
'请款备注'
,
extra
:
data
.
remark
,
type
:
'text'
},
{
label
:
'对账单号'
,
extra
:
data
?.
reconciliationNo
?
<
Link
to=
{
`/memberCenter/balance/businessReconciliation/search/preview?id=${data.reconciliationId}&no=${data.reconciliationNo}`
}
>
{
data
.
reconciliationNo
}
</
Link
>
:
'-'
,
type
:
'text'
},
{
label
:
'发票号码'
,
extra
:
'40122826 (2020-08-25)'
,
type
:
'text'
},
{
label
:
'状态'
,
extra
:
<
StatusTag
type=
'primary'
title=
{
data
.
statusName
}
/>,
type
:
'text'
},
{
label
:
'单据时间'
,
extra
:
data
.
createTime
,
type
:
'text'
},
]
},
{
col
:
[
{
label
:
'收款方'
,
extra
:
data
.
payee
,
type
:
'text'
},
{
label
:
'账号名称'
,
extra
:
data
.
accountName
,
type
:
'text'
},
{
label
:
'银行账号'
,
extra
:
data
.
bankAccount
,
type
:
'text'
},
{
label
:
'开户行'
,
extra
:
data
.
bankDeposit
,
type
:
'text'
},
{
label
:
'请款金额'
,
extra
:
`¥
${
priceFormat
(
data
.
applyAmount
)}
`
,
type
:
'text'
},
{
label
:
'核销金额'
,
extra
:
`¥
${
priceFormat
(
data
.
writeOffAmount
)}
`
,
type
:
'text'
},
{
label
:
'预计付款日期'
,
extra
:
formatTimeString
(
data
.
expectPayTime
,
'YYYY-MM-DD'
),
type
:
'text'
},
{
label
:
'付款方式'
,
extra
:
data
.
payWayName
,
type
:
'text'
},
]
},
]
)
}
})
}
const
_openWriteOff
=
(
record
)
=>
{
setWriteOffRecord
(
record
)
setWriteOffVisible
(
true
)
}
useEffect
(()
=>
{
_getDetail
()
},
[])
const
_handleOpen
=
(
record
:
any
)
=>
{
if
(
record
.
billType
===
1
)
{
window
.
open
(
`/memberCenter/tranactionAbility/saleOrder/orderList/preview?id=
${
record
.
billId
}
`
)
}
else
if
(
record
.
billType
===
2
)
{
window
.
open
(
`memberCenter/contract/coordination/coordinationList/details?contractId=
${
record
.
billId
}
`
)
}
else
{
window
.
open
(
`/memberCenter/afterService/returnManage/returnQuery/detail?id=
${
record
.
billId
}
`
)
}
}
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'单据号'
,
key
:
'billNo'
,
dataIndex
:
'billNo'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Button
type=
'link'
onClick=
{
()
=>
{
_handleOpen
(
record
)}
}
>
{
text
}
</
Button
>
},
{
title
:
'单据摘要'
,
key
:
'billAbstract'
,
dataIndex
:
'billAbstract'
,
},
{
title
:
'单据类型'
,
key
:
'billTypeName'
,
dataIndex
:
'billTypeName'
,
},
{
title
:
'单据时间'
,
key
:
'billTime'
,
dataIndex
:
'billTime'
,
},
{
title
:
'单据状态'
,
key
:
'billStatus'
,
dataIndex
:
'billStatus'
,
render
:
(
text
:
any
)
=>
<
StatusTag
type=
'primary'
title=
{
text
}
/>
},
{
title
:
'单据金额'
,
key
:
'billAmount'
,
dataIndex
:
'billAmount'
,
render
:
(
text
:
any
)
=>
`¥
${
priceFormat
(
text
)}
`
},
{
title
:
'含税/税率'
,
key
:
'taxRate'
,
dataIndex
:
'taxRate'
,
render
:
(
text
:
any
)
=>
{
return
text
>
0
?
`是/
${
text
}
%`
:
'否'
;
}
},
{
title
:
'已付款'
,
key
:
'paid'
,
dataIndex
:
'paid'
,
render
:
(
text
:
any
)
=>
`¥
${
priceFormat
(
text
)}
`
},
{
title
:
'已请款待付款'
,
key
:
'appliedUnpaid'
,
dataIndex
:
'appliedUnpaid'
,
render
:
(
text
:
any
)
=>
`¥
${
priceFormat
(
text
)}
`
},
{
title
:
'对账金额'
,
key
:
'reconciliationAmount'
,
dataIndex
:
'reconciliationAmount'
,
render
:
(
text
:
any
)
=>
`¥
${
priceFormat
(
text
)}
`
},
{
title
:
'请款金额'
,
key
:
'applyPayment'
,
dataIndex
:
'applyPayment'
,
render
:
(
text
:
any
)
=>
`¥
${
priceFormat
(
text
)}
`
},
{
title
:
'核销金额'
,
key
:
'writeOffAmount'
,
dataIndex
:
'writeOffAmount'
,
render
:
(
text
:
any
,
record
:
any
)
=>
text
>
0
&&
<
Button
type=
'link'
onClick=
{
()
=>
{
_openWriteOff
(
record
)
}
}
>
¥ $
{
priceFormat
(
text
)
}
</
Button
>
},
{
title
:
'可核销金额'
,
key
:
'canWriteOffAmount'
,
dataIndex
:
'canWriteOffAmount'
,
render
:
(
text
:
any
,
record
:
any
)
=>
text
>
0
&&
<
Button
type=
'link'
onClick=
{
()
=>
{
_openWriteOff
(
record
)
}
}
>
¥ $
{
priceFormat
(
text
)
}
</
Button
>
},
];
const
loadingTableData
=
async
(
params
)
=>
{
const
_params
=
{
...
params
};
_params
.
applyAmountId
=
id
;
_params
.
applyNo
=
no
;
const
{
data
}
=
await
getSettleAccountsBusinessApplyAmountApplyAmountRowList
(
_params
)
return
data
}
return
(
<>
<
PeripheralLayout
no=
{
dataSource
?.
applyNo
}
detail=
{
dataSource
?.
applyAbstract
}
tabLink=
{
_tabs
}
components=
{
<
Fragment
>
<
CommonLayout
layoutId=
"basicLayout"
title=
{
intl
.
formatMessage
({
id
:
'balance.jibenxinxi'
})
}
effect=
{
basicEffect
}
commonSpan=
{
12
}
/>
<
Card
id=
'billLayout'
title=
{
'请款明细'
}
>
<
StandardTable
keepAlive=
{
false
}
currentRef=
{
currentRef
}
columns=
{
columns
}
tableProps=
{
{
rowKey
:
'id'
}
}
fetchTableData=
{
(
params
:
any
)
=>
loadingTableData
(
params
)
}
/>
</
Card
>
</
Fragment
>
}
/>
<
WriteOffDrawer
visible=
{
writeOffVisible
}
record=
{
writeOffRecord
}
onClose=
{
()
=>
{
setWriteOffVisible
(
false
)
}
}
/>
</>
)
}
export
default
SearchDetail
;
src/pages/balance/businessRequestFundsCollaboration/search/index.tsx
View file @
f36253a4
import
React
,
{
useRef
,
useState
}
from
'react'
import
{
Card
,
Typography
,
Space
,
Button
}
from
'antd'
import
React
,
{
useRef
}
from
'react'
import
{
Card
,
Typography
,
Space
}
from
'antd'
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
StandardTable
from
'@/components/StandardTable'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
...
...
@@ -11,7 +11,6 @@ import NiceForm from '@/components/NiceForm'
import
StatusTag
from
'@/components/StatusTag'
;
import
{
formatTimeString
}
from
'@/utils'
import
{
priceFormat
}
from
'@/utils/numberFomat'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
;
import
{
getSettleAccountsBusinessApplyAmountTeamworkVendorApplyAmountList
,
getSettleAccountsBusinessApplyAmountItemApplyAmountStatus
}
from
'@/services/SettleV2Api'
import
{
createFormActions
}
from
'@formily/antd'
import
{
getIntl
,
Link
}
from
'umi'
;
...
...
@@ -57,8 +56,8 @@ const Search: React.FC = () => {
)
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.qingkuanleixing'
}),
key
:
'applyType'
,
dataIndex
:
'applyType'
,
key
:
'applyType
Name
'
,
dataIndex
:
'applyType
Name
'
,
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.qingkuanfang'
}),
key
:
'payer'
,
...
...
@@ -87,9 +86,9 @@ const Search: React.FC = () => {
width
:
180
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.waibuzhuangtai'
}),
key
:
'status'
,
dataIndex
:
'status'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
StatusTag
type=
'default'
title=
{
record
.
status
}
/>
key
:
'status
Name
'
,
dataIndex
:
'status
Name
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
StatusTag
type=
'default'
title=
{
text
}
/>
}];
return
(
...
...
src/pages/balance/components/WriteOffDrawer/index.tsx
View file @
f36253a4
import
React
,
{
useRef
,
useState
,
useMemo
}
from
'react'
;
import
{
Drawer
,
Button
,
Form
,
Input
}
from
'antd'
;
import
{
Drawer
,
Button
,
Form
,
Input
,
Table
}
from
'antd'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
StandardTable
from
'@/components/StandardTable'
;
import
{
formatTimeString
}
from
'@/utils'
...
...
@@ -154,14 +154,18 @@ const WriteOffDrawer: React.FC<WriteOffDrawerProps> = (props: WriteOffDrawerProp
<
Form
form=
{
form
}
>
<
StandardTable
keepAlive=
{
false
}
fetchTableData=
{
params
=>
loadingTableData
(
params
)
}
columns=
{
editAble
?
editColumns
:
columns
}
currentRef=
{
ref
}
tableProps=
{
{
pagination
:
!
editAble
}
}
rowKey=
"id"
/>
{
editAble
?
(
<
StandardTable
keepAlive=
{
false
}
fetchTableData=
{
params
=>
loadingTableData
(
params
)
}
columns=
{
editAble
?
editColumns
:
columns
}
currentRef=
{
ref
}
tableProps=
{
{
pagination
:
!
editAble
}
}
rowKey=
"id"
/>
)
:
(
<
Table
dataSource=
{
record
.
writeOffRecords
}
columns=
{
columns
}
pagination=
{
false
}
/>
)
}
</
Form
>
</
Drawer
>
);
...
...
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