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
XieZhiXiong
jinfa-platform
Commits
3ae1249c
Commit
3ae1249c
authored
Dec 22, 2021
by
卢均锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 缓存业务对账
-对接接口
parent
b2ebd22c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
37 deletions
+67
-37
index.tsx
.../businessReconciliation/components/detailDrawer/index.tsx
+0
-0
index.tsx
src/pages/balance/businessReconciliation/detail/index.tsx
+29
-25
add.tsx
src/pages/balance/businessReconciliation/readyAdd/add.tsx
+34
-8
index.tsx
...ance/businessReconciliation/readyReconciliation/index.tsx
+0
-0
index.tsx
src/pages/balance/components/BusinessFileLayout/index.tsx
+4
-4
No files found.
src/pages/balance/businessReconciliation/components/detailDrawer/index.tsx
View file @
3ae1249c
This diff is collapsed.
Click to expand it.
src/pages/balance/businessReconciliation/detail/index.tsx
View file @
3ae1249c
...
...
@@ -16,6 +16,7 @@ import ProgressLayout, { ProgressValue } from '@/pages/transaction/purchaseAbili
import
CommonLayout
from
'@/pages/transaction/purchaseAbility/components/detail/components/bidCommonLayout'
;
import
{
getSettleAccountsBusinessReconciliationDetailReconciliation
,
getSettleAccountsBusinessReconciliationReconciliationRowList
}
from
'@/services/SettleV2Api'
import
BusinessFileLayout
from
'../../components/BusinessFileLayout'
;
const
intl
=
getIntl
();
const
TABLINK
=
[
...
...
@@ -85,7 +86,7 @@ const SearchDetail = () => {
{
label
:
intl
.
formatMessage
({
id
:
'balance.shoukuanfang'
}),
extra
:
data
.
payer
,
type
:
'text'
},
{
label
:
intl
.
formatMessage
({
id
:
'balance.fukuanfang'
}),
extra
:
data
.
payee
,
type
:
'text'
},
{
label
:
intl
.
formatMessage
({
id
:
'balance.faqiduizhangfang'
}),
extra
:
data
.
launchReconciliation
,
type
:
'text'
},
{
label
:
intl
.
formatMessage
({
id
:
'balance.duizhangzongjine'
}),
extra
:
`¥
${
data
.
reconciliationMoneyAmount
}
`
,
type
:
'text'
},
{
label
:
intl
.
formatMessage
({
id
:
'balance.duizhangzongjine'
}),
extra
:
`¥
${
priceFormat
(
data
.
reconciliationMoneyAmount
)
}
`
,
type
:
'text'
},
{
label
:
intl
.
formatMessage
({
id
:
'balance.danjushijian'
}),
extra
:
data
.
createTime
,
type
:
'text'
},
]
},
...
...
@@ -164,6 +165,7 @@ const SearchDetail = () => {
title
:
'单价(含税)'
,
key
:
'price'
,
dataIndex
:
'price'
,
render
:
(
text
:
any
)
=>
`¥
${
priceFormat
(
text
)}
`
},
{
title
:
'待对账数量'
,
...
...
@@ -174,6 +176,7 @@ const SearchDetail = () => {
title
:
'待对账金额(含税)'
,
key
:
'reconciliationMoneyAmount'
,
dataIndex
:
'reconciliationMoneyAmount'
,
render
:
(
text
:
any
)
=>
`¥
${
priceFormat
(
text
)}
`
},
{
title
:
'本次对账数量'
,
...
...
@@ -184,6 +187,7 @@ const SearchDetail = () => {
title
:
'本次对账金额(含税)'
,
key
:
'currentMoney'
,
dataIndex
:
'currentMoney'
,
render
:
(
text
:
any
)
=>
`¥
${
priceFormat
(
text
)}
`
},
];
...
...
@@ -196,30 +200,30 @@ const SearchDetail = () => {
}
return
(
<
PeripheralLayout
no=
{
dataSource
?.
reconciliationNo
}
detail=
{
dataSource
?.
reconciliationAbstract
}
tabLink=
{
_tabs
}
components=
{
<
Fragment
>
<
ProgressLayout
effect=
{
[{
title
:
'外部流转'
,
state
:
1
,
logs
:
[]
}]
}
/
>
<
CommonLayout
layoutId=
"basicLayout"
title=
{
intl
.
formatMessage
({
id
:
'balance.jibenxinxi'
})
}
effect=
{
basicEffect
}
commonSpan=
{
12
}
/>
<
Card
id=
'billLayout'
title=
{
intl
.
formatMessage
({
id
:
'balance.duizhangdanmingxi'
})
}
>
<
StandardTable
keepAlive=
{
false
}
currentRef=
{
currentRef
}
columns=
{
columns
}
tableProps=
{
{
rowKey
:
'reconciliationRowId'
}
}
fetchTableData=
{
(
params
:
any
)
=>
loadingTableData
(
params
)
}
/>
</
Card
>
<
Card
id=
'fileLayout'
title=
{
intl
.
formatMessage
({
id
:
'balance.fujian'
})
}
>
</
Card
>
<
CommonLayout
layoutId=
"invoiceLayout"
title=
{
intl
.
formatMessage
({
id
:
'balance.fapiaoxinxi'
})
}
effect=
{
invoiceEffect
}
commonSpan=
{
12
}
/
>
</
Fragment
>
}
/
>
<
div
style=
{
{
margin
:
'-24px -24px 0'
}
}
>
<
PeripheralLayout
no=
{
dataSource
?.
reconciliationNo
}
detail=
{
dataSource
?.
reconciliationAbstract
}
tabLink=
{
_tabs
}
components=
{
<
Fragment
>
<
ProgressLayout
effect=
{
[{
title
:
'外部流转'
,
state
:
1
,
logs
:
[]
}]
}
/>
<
CommonLayout
layoutId=
"basicLayout"
title=
{
intl
.
formatMessage
({
id
:
'balance.jibenxinxi'
})
}
effect=
{
basicEffect
}
commonSpan=
{
12
}
/
>
<
Card
id=
'billLayout'
title=
{
intl
.
formatMessage
({
id
:
'balance.duizhangdanmingxi'
})
}
>
<
StandardTable
keepAlive=
{
false
}
currentRef=
{
currentRef
}
columns=
{
columns
}
tableProps=
{
{
rowKey
:
'reconciliationRowId'
}
}
fetchTableData=
{
(
params
:
any
)
=>
loadingTableData
(
params
)
}
/
>
</
Card
>
<
BusinessFileLayout
fetchdata=
{
dataSource
?.
files
}
editAble=
{
false
}
/>
<
CommonLayout
layoutId=
"invoiceLayout"
title=
{
intl
.
formatMessage
({
id
:
'balance.fapiaoxinxi'
})
}
effect=
{
invoiceEffect
}
commonSpan=
{
12
}
/
>
<
/
Fragment
>
}
/>
</
div
>
)
}
export
default
SearchDetail
;
src/pages/balance/businessReconciliation/readyAdd/add.tsx
View file @
3ae1249c
...
...
@@ -8,7 +8,7 @@ import { GlobalConfig } from '@/global/config'
import
{
formatTimeString
}
from
'@/utils'
import
{
priceFormat
}
from
'@/utils/numberFomat'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
{
getSettleAccountsBusinessReconciliationDetailReconciliation
,
getSettleAccountsBusinessReconciliationReconciliationRowList
,
postSettleAccountsBusinessReconciliationUpdateReconciliation
,
postSettleAccountsBusinessReconciliationSaveReconciliation
}
from
'@/services/SettleV2Api'
import
{
getSettleAccountsBusinessReconciliationDetailReconciliation
,
getSettleAccountsBusinessReconciliationReconciliationRowList
,
postSettleAccountsBusinessReconciliationUpdateReconciliation
,
postSettleAccountsBusinessReconciliationSaveReconciliation
,
postSettleAccountsBusinessReconciliationGenerateReconciliation
}
from
'@/services/SettleV2Api'
import
PeripheralLayout
from
'@/pages/transaction/purchaseAbility/components/detail'
;
import
Card
from
'@/pages/transaction/purchaseAbility/components/card'
;
...
...
@@ -35,6 +35,7 @@ const Add = () => {
id
,
no
},
state
,
pathname
,
}
=
history
.
location
;
const
[
form
]
=
Form
.
useForm
();
...
...
@@ -42,6 +43,7 @@ const Add = () => {
const
[
path
]
=
useState
(
pathname
.
split
(
'/'
)[
pathname
.
split
(
'/'
).
length
-
1
]);
const
[
dataSource
,
setDataSource
]
=
useState
<
any
>
({});
const
[
tabelSource
,
setTabelSource
]
=
useState
<
any
>
([]);
const
[
ids
,
setIds
]
=
useState
<
any
>
([]);
const
[
drawerVisible
,
setDrawerVisible
]
=
useState
<
boolean
>
(
false
);
const
[
unsaved
,
setUnsaved
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
...
...
@@ -50,9 +52,9 @@ const Add = () => {
const
_tabs
=
useMemo
(()
=>
{
let
_list
=
[];
TABLINK
.
forEach
((
item
)
=>
{
if
(
item
.
id
===
'billLayout'
)
{
item
.
title
=
`
${
item
.
title
}${
tabelSource
.
length
?
''
:
'('
+
tabelSource
.
length
+
')'
}
`
}
//
if (item.id === 'billLayout') {
//
item.title = `${item.title}${tabelSource.length ? '' : '(' + tabelSource.length + ')'}`
//
}
_list
.
push
(
item
)
})
return
_list
;
...
...
@@ -130,7 +132,11 @@ const Add = () => {
if
(
_editAble
)
{
setUnsaved
(
true
)
if
(
path
===
'add'
)
{
postSettleAccountsBusinessReconciliationGenerateReconciliation
({
SettlementGenerateVO
:
state
?.
ros
}).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
}
})
}
else
{
_getDetail
();
_getRowList
();
...
...
@@ -278,6 +284,8 @@ const Add = () => {
}
const
_dataSource
=
{
...
dataSource
};
_dataSource
.
reconciliationMoneyAmount
=
_amount
;
const
_ids
=
tabelSource
.
map
((
item
)
=>
item
.
productId
);
setIds
(
_ids
);
setDataSource
(
_dataSource
);
},
[
tabelSource
])
...
...
@@ -289,16 +297,18 @@ const Add = () => {
reconciliationAbstract
:
formRes
.
reconciliationAbstract
,
reconciliationMoneyAmount
:
formRes
.
reconciliationMoneyAmount
,
remark
:
formRes
.
remark
,
reconciliationNo
:
no
,
rows
:
tabelSource
}
if
(
filesRef
?.
current
?.
data
&&
filesRef
?.
current
?.
data
.
length
>
0
)
{
_params
.
files
=
filesRef
?.
current
?.
data
;
}
if
(
_flag
)
{
_params
.
payer
=
dataSource
.
payer
;
_params
.
payee
=
dataSource
.
payee
;
_params
.
launchReconciliation
=
dataSource
.
launchReconciliation
;
}
else
{
_params
.
reconciliationId
=
id
;
_params
.
reconciliationNo
=
no
;
}
_fetch
=
_flag
?
postSettleAccountsBusinessReconciliationSaveReconciliation
:
postSettleAccountsBusinessReconciliationUpdateReconciliation
;
setSubmitLoading
(
true
)
...
...
@@ -315,8 +325,15 @@ const Add = () => {
})
}
const
addRows
=
(
rows
)
=>
{
const
_tabelSource
=
[...
tabelSource
];
const
_rows
=
_tabelSource
.
concat
(
rows
);
setTabelSource
(
_rows
);
setDrawerVisible
(
false
);
}
return
(
<>
<
div
style=
{
{
margin
:
'-24px -24px 0'
}
}
>
<
PeripheralLayout
no=
{
_title
}
tabLink=
{
_tabs
}
...
...
@@ -372,14 +389,23 @@ const Add = () => {
</
Card
>
<
BusinessFileLayout
fetchdata=
{
[]
}
currentRef=
{
filesRef
}
editAble=
{
_editAble
}
/>
<
DetailDrawer
searchParams=
{
{
payer
:
dataSource
.
payer
,
payee
:
dataSource
.
payee
,
taxRate
:
tabelSource
?.[
0
]?.
taxRate
||
''
,
ids
:
ids
?.
join
(
','
)
||
''
}
}
visible=
{
drawerVisible
}
onClose=
{
()
=>
{
setDrawerVisible
(
false
)
}
}
onOk=
{
addRows
}
/>
</
Form
>
}
/>
<
Prompt
when=
{
unsaved
}
message=
{
intl
.
formatMessage
({
id
:
'common.tip.save.confirm'
},
{
default
:
'您还有未保存的内容,是否确定要离开?'
})
}
/>
</>
</
div
>
)
}
export
default
Add
;
src/pages/balance/businessReconciliation/readyReconciliation/index.tsx
View file @
3ae1249c
This diff is collapsed.
Click to expand it.
src/pages/balance/components/BusinessFileLayout/index.tsx
View file @
3ae1249c
...
...
@@ -37,8 +37,8 @@ const BusinessFileLayout: React.FC<BusinessFileLayoutProps> = (props: BusinessFi
if
(
file
.
response
)
{
if
(
file
.
response
.
code
===
1000
)
{
arr
.
push
({
n
ame
:
file
.
name
,
u
rl
:
file
.
response
.
data
fileN
ame
:
file
.
name
,
fileU
rl
:
file
.
response
.
data
})
setloading
(
false
);
}
...
...
@@ -71,9 +71,9 @@ const BusinessFileLayout: React.FC<BusinessFileLayoutProps> = (props: BusinessFi
<
div
>
{
files
.
length
>
0
&&
files
.
map
((
v
,
index
)
=>
(
<
div
key=
{
index
}
className=
{
styles
.
upload_item
}
>
<
a
className=
{
styles
.
upload_left
}
href=
{
v
.
u
rl
}
target=
'_blank'
>
<
a
className=
{
styles
.
upload_left
}
href=
{
v
.
fileU
rl
}
target=
'_blank'
>
<
LinkOutlined
/>
<
span
>
{
v
.
n
ame
}
</
span
>
<
span
>
{
v
.
fileN
ame
}
</
span
>
</
a
>
{
editAble
&&
<
div
className=
{
styles
.
upload_right
}
onClick=
{
()
=>
removeFiles
(
index
)
}
>
<
DeleteOutlined
/>
...
...
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