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
dce67c92
Commit
dce67c92
authored
Jan 05, 2022
by
卢均锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 业务请款-对账单请款逻辑
parent
616ff752
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
12 deletions
+40
-12
add.tsx
src/pages/balance/businessRequestFunds/admin/add.tsx
+40
-12
No files found.
src/pages/balance/businessRequestFunds/admin/add.tsx
View file @
dce67c92
...
...
@@ -8,7 +8,7 @@ import { GlobalConfig } from '@/global/config'
import
{
formatTimeString
}
from
'@/utils'
import
{
priceFormat
}
from
'@/utils/numberFomat'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
{
getSettleAccountsBusinessReconciliationItemPayType
,
getSettleAccountsPlatformSettlementTypeList
,
postSettleAccountsBusinessApplyAmountSaveApplyAmount
}
from
'@/services/SettleV2Api'
import
{
getSettleAccountsBusinessReconciliationItemPayType
,
getSettleAccountsPlatformSettlementTypeList
,
postSettleAccountsBusinessApplyAmountSaveApplyAmount
,
getSettleAccountsCorporateAccountConfig
}
from
'@/services/SettleV2Api'
import
PeripheralLayout
from
'@/pages/transaction/purchaseAbility/components/detail'
;
import
Card
from
'@/pages/transaction/purchaseAbility/components/card'
;
...
...
@@ -61,8 +61,6 @@ const Add = () => {
const
[
documentType
,
setDocumentType
]
=
useState
<
number
>
(
1
);
const
[
writeOffData
,
setWriteOffData
]
=
useState
<
any
>
({});
console
.
log
(
_state
)
const
_tabs
=
useMemo
(()
=>
{
let
_list
=
[];
TABLINK
.
forEach
((
item
)
=>
{
...
...
@@ -100,7 +98,7 @@ const Add = () => {
setMoneyPayWayOptions
(
res
.
data
.
map
((
item
)
=>
{
return
{
label
:
item
.
methodName
,
value
:
item
.
methodCode
}
}));
}
})
if
(
_state
?.
data
?.
applyNo
)
{
if
(
_state
?.
data
?.
vendorMemberId
)
{
form
.
setFieldsValue
({
applyAbstract
:
_state
?.
data
.
applyAbstract
,
payee
:
_state
?.
data
.
payee
,
...
...
@@ -148,13 +146,43 @@ const Add = () => {
const
_handleOk
=
()
=>
{
form
.
validateFields
().
then
(
formRes
=>
{
const
_params
=
{
...
formRes
,
...
dataSource
,
rows
:
tabelSource
,
expectPayTime
:
formatTimeString
(
formRes
.
expectPayTime
,
'YYYY-MM-DD'
)
};
const
_params
=
{
...
dataSource
,
...
formRes
,
rows
:
tabelSource
,
expectPayTime
:
formatTimeString
(
formRes
.
expectPayTime
,
'YYYY-MM-DD'
)
};
setSubmitLoading
(
true
);
if
(
_isAdd
)
{
postSettleAccountsBusinessApplyAmountSaveApplyAmount
(
_params
).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
history
.
replace
(
'memberCenter/balance/businessRequestFunds/admin'
)
history
.
replace
(
'/memberCenter/balance/businessRequestFunds/admin'
)
}
else
{
setSubmitLoading
(
false
)
}
})
}).
catch
(()
=>
{
setSubmitLoading
(
false
)
})
}
})
}
const
_handleMemberOk
=
(
record
:
any
)
=>
{
const
_params
=
{
memberId
:
record
.
memberId
,
memberRoleId
:
record
.
roleId
}
getSettleAccountsCorporateAccountConfig
(
_params
).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
const
data
=
res
.
data
;
const
_dataSource
=
{
...
dataSource
};
_dataSource
.
payee
=
record
.
name
;
_dataSource
.
vendorMemberId
=
record
.
memberId
;
_dataSource
.
vendorRoleId
=
record
.
roleId
;
_dataSource
.
accountName
=
data
.
name
;
_dataSource
.
bankDeposit
=
data
.
bankDeposit
;
_dataSource
.
bankAccount
=
data
.
bankAccount
;
form
.
setFieldsValue
({
payee
:
record
.
name
})
setDataSource
(
_dataSource
)
setMemberDrawerVisible
(
false
)
}
})
}
...
...
@@ -431,7 +459,7 @@ const Add = () => {
name=
'applyType'
rules=
{
[{
required
:
true
,
message
:
'请选择请款类型'
}]
}
>
<
Select
placeholder=
{
'请选择请款类型'
}
options=
{
applyOptions
}
/>
<
Select
placeholder=
{
'请选择请款类型'
}
disabled=
{
!
_isAdd
}
options=
{
applyOptions
}
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
...
...
@@ -453,7 +481,7 @@ const Add = () => {
name=
'payWay'
rules=
{
[{
required
:
true
,
message
:
'请选择付款方式'
}]
}
>
<
Radio
.
Group
onChange=
{
_handlePayWay
}
>
<
Radio
.
Group
value=
{
payWay
}
onChange=
{
_handlePayWay
}
>
{
payWayData
?.
map
((
item
)
=>
<
Radio
.
Button
value=
{
item
.
id
}
key=
{
`radioButton_${item.id}`
}
>
{
item
.
text
}
</
Radio
.
Button
>)
}
</
Radio
.
Group
>
</
Form
.
Item
>
...
...
@@ -501,7 +529,7 @@ const Add = () => {
label=
'收款方'
name=
'payee'
>
<
Input
className=
{
styles
[
'revise_style'
]
}
readOnly
maxLength=
{
80
}
addonAfter=
{
<
Button
disabled=
{
_isFunds
}
type=
'primary'
icon=
{
<
LinkOutlined
/>
}
onClick=
{
()
=>
{
setMemberDrawerVisible
(
true
)
}
}
/>
}
/>
<
Input
className=
{
styles
[
'revise_style'
]
}
readOnly
maxLength=
{
80
}
addonAfter=
{
<
Button
disabled=
{
_isFunds
||
!
_isAdd
}
type=
'primary'
icon=
{
<
LinkOutlined
/>
}
onClick=
{
()
=>
{
setMemberDrawerVisible
(
true
)
}
}
/>
}
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
...
...
@@ -509,7 +537,7 @@ const Add = () => {
<
Form
.
Item
label=
'账号名称'
>
{
dataSource
[
'
n
ame'
]
}
{
dataSource
[
'
accountN
ame'
]
}
</
Form
.
Item
>
</
Row
>
<
Row
>
...
...
@@ -587,7 +615,7 @@ const Add = () => {
/>
<
WriteOffDrawer
visible=
{
writeOffDrawer
}
record=
{
writeOffData
}
editAble=
{
true
}
onClose=
{
()
=>
{
setWriteOffDrawer
(
false
)
}
}
onOk=
{
_handleWriteOffOk
}
/>
<
ContractDrawer
visible=
{
contractDrawerVisible
}
onClose=
{
()
=>
{
setContractDrawerVisible
(
false
)
}
}
/>
<
MemberDrawer
visible=
{
memberDrawerVisible
}
onClose=
{
()
=>
{
setMemberDrawerVisible
(
false
)
}
}
/>
<
MemberDrawer
visible=
{
memberDrawerVisible
}
onClose=
{
()
=>
{
setMemberDrawerVisible
(
false
)
}
}
onOk=
{
_handleMemberOk
}
/>
<
RequestFundsDrawer
visible=
{
requestFundsDrawerVisible
}
onClose=
{
()
=>
{
setRequestFundsDrawerVisible
(
false
)
}
}
/>
<
Prompt
when=
{
unsaved
}
message=
{
intl
.
formatMessage
({
id
:
'common.tip.save.confirm'
},
{
default
:
'您还有未保存的内容,是否确定要离开?'
})
}
/>
</>
...
...
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