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
6ba1a5d4
Commit
6ba1a5d4
authored
Dec 22, 2021
by
卢均锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 缓存业务对账
parent
41ffbd00
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
760 additions
and
308 deletions
+760
-308
index.tsx
.../businessReconciliation/components/detailDrawer/index.tsx
+58
-92
index.tsx
src/pages/balance/businessReconciliation/detail/index.tsx
+225
-0
add.tsx
src/pages/balance/businessReconciliation/readyAdd/add.tsx
+0
-0
index.tsx
src/pages/balance/businessReconciliation/readyAdd/index.tsx
+79
-47
index.tsx
...ance/businessReconciliation/readyReconciliation/index.tsx
+0
-0
index.tsx
src/pages/balance/businessReconciliation/search/index.tsx
+77
-57
index.less
...ciliationCollaboration/components/modalOperate/index.less
+11
-0
index.tsx
...nciliationCollaboration/components/modalOperate/index.tsx
+157
-0
index.tsx
...usinessReconciliationCollaboration/readyConfirm/index.tsx
+51
-38
index.tsx
...ce/businessReconciliationCollaboration/readyPay/index.tsx
+36
-23
index.tsx
...ance/businessReconciliationCollaboration/search/index.tsx
+66
-51
No files found.
src/pages/balance/businessReconciliation/components/detailDrawer/index.tsx
View file @
6ba1a5d4
This diff is collapsed.
Click to expand it.
src/pages/balance/businessReconciliation/detail/index.tsx
0 → 100644
View file @
6ba1a5d4
import
React
,
{
Fragment
,
useEffect
,
useState
,
useMemo
,
useRef
}
from
'react'
;
import
{
Badge
,
Popconfirm
,
Button
}
from
'antd'
;
import
{
getIntl
,
history
}
from
'umi'
;
import
{
CheckCircleOutlined
}
from
'@ant-design/icons'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
StandardTable
}
from
'god'
;
import
{
GlobalConfig
}
from
'@/global/config'
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
ProgressLayout
,
{
ProgressValue
}
from
'@/pages/transaction/purchaseAbility/components/detail/components/progressCommonLayout'
;
import
CommonLayout
from
'@/pages/transaction/purchaseAbility/components/detail/components/bidCommonLayout'
;
import
{
getSettleAccountsBusinessReconciliationDetailReconciliation
,
getSettleAccountsBusinessReconciliationReconciliationRowList
}
from
'@/services/SettleV2Api'
const
intl
=
getIntl
();
const
TABLINK
=
[
{
id
:
'progressLayout'
,
title
:
intl
.
formatMessage
({
id
:
'balance.liuzhuanjindu'
})
},
{
id
:
'basicLayout'
,
title
:
intl
.
formatMessage
({
id
:
'balance.jibenxinxi'
})
},
{
id
:
'billLayout'
,
title
:
intl
.
formatMessage
({
id
:
'balance.duizhangdanmingxi'
})
},
{
id
:
'fileLayout'
,
title
:
intl
.
formatMessage
({
id
:
'balance.fujian'
}),
},
{
id
:
'invoiceLayout'
,
title
:
intl
.
formatMessage
({
id
:
'balance.fapiaoxinxi'
}),
},
]
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
[
dataSource
,
setDataSource
]
=
useState
<
any
>
({});
const
currentRef
=
useRef
({});
const
[
basicEffect
,
setBasicEffect
]
=
useState
<
any
>
([])
const
[
invoiceEffect
,
setInvoiceEffect
]
=
useState
<
any
>
(
[
{
col
:
[
{
label
:
intl
.
formatMessage
({
id
:
'balance.kuaididanhao'
}),
extra
:
'SF202108171640'
,
type
:
'text'
},
{
label
:
intl
.
formatMessage
({
id
:
'balance.kuaidigongsi'
}),
extra
:
'顺丰快递'
,
type
:
'text'
},
]
},
{
col
:
[
{
label
:
intl
.
formatMessage
({
id
:
'balance.jisongriqi'
}),
extra
:
'2020-08-25'
,
type
:
'text'
},
{
label
:
intl
.
formatMessage
({
id
:
'balance.fapiaohaoma'
}),
extra
:
'40122826 (2020-08-21)'
,
type
:
'text'
},
]
},
]
)
const
_tabs
=
useMemo
(()
=>
{
let
_list
=
[];
TABLINK
.
forEach
((
item
)
=>
{
_list
.
push
(
item
)
})
return
_list
;
},
[
pathPci
])
const
_getDetail
=
(
id
:
string
)
=>
{
getSettleAccountsBusinessReconciliationDetailReconciliation
({
reconciliationId
:
id
,
reconciliationNo
:
no
}).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
const
data
=
res
.
data
;
setDataSource
(
data
);
setBasicEffect
(
[
{
col
:
[
{
label
:
intl
.
formatMessage
({
id
:
'balance.duizhangdanhao'
}),
extra
:
data
.
reconciliationNo
,
type
:
'text'
},
{
label
:
intl
.
formatMessage
({
id
:
'balance.danjuzhaiyao'
}),
extra
:
data
.
reconciliationAbstract
,
type
:
'text'
},
{
label
:
intl
.
formatMessage
({
id
:
'balance.duizhangdanleixing'
}),
extra
:
data
.
reconciliationType
,
type
:
'text'
},
{
label
:
intl
.
formatMessage
({
id
:
'balance.beizhu'
}),
extra
:
data
.
remark
,
type
:
'text'
},
{
label
:
intl
.
formatMessage
({
id
:
'balance.zhuangtai'
}),
extra
:
<
StatusTag
type=
'primary'
title=
{
data
.
status
}
/>,
type
:
'text'
},
]
},
{
col
:
[
{
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.danjushijian'
}),
extra
:
data
.
createTime
,
type
:
'text'
},
]
},
]
)
}
})
}
useEffect
(()
=>
{
_getDetail
(
id
)
},
[])
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'订单号'
,
key
:
'orderNo'
,
dataIndex
:
'orderNo'
,
},
{
title
:
'预计结算日期'
,
key
:
'settlementDate'
,
dataIndex
:
'settlementDate'
,
},
{
title
:
'发货批次'
,
key
:
'deliveryBatch'
,
dataIndex
:
'deliveryBatch'
,
},
{
title
:
'发货单号'
,
key
:
'deliveryNo'
,
dataIndex
:
'deliveryNo'
,
},
{
title
:
'收货单号'
,
key
:
'receiveNo'
,
dataIndex
:
'receiveNo'
,
},
{
title
:
'物料编码'
,
key
:
'productNo'
,
dataIndex
:
'productNo'
,
},
{
title
:
'物料名称'
,
key
:
'productName'
,
dataIndex
:
'productName'
,
},
{
title
:
'规格型号'
,
key
:
'spec'
,
dataIndex
:
'spec'
,
},
{
title
:
'品类'
,
key
:
'category'
,
dataIndex
:
'category'
,
},
{
title
:
'品牌'
,
key
:
'brand'
,
dataIndex
:
'brand'
,
},
{
title
:
'单位'
,
key
:
'unit'
,
dataIndex
:
'unit'
,
},
{
title
:
'税率'
,
key
:
'taxRate'
,
dataIndex
:
'taxRate'
,
},
{
title
:
'单价(含税)'
,
key
:
'price'
,
dataIndex
:
'price'
,
},
{
title
:
'待对账数量'
,
key
:
'reconciliationQuantity'
,
dataIndex
:
'reconciliationQuantity'
,
},
{
title
:
'待对账金额(含税)'
,
key
:
'reconciliationMoneyAmount'
,
dataIndex
:
'reconciliationMoneyAmount'
,
},
{
title
:
'本次对账数量'
,
key
:
'currentReconciliationQuantity'
,
dataIndex
:
'currentReconciliationQuantity'
,
},
{
title
:
'本次对账金额(含税)'
,
key
:
'currentMoney'
,
dataIndex
:
'currentMoney'
,
},
];
const
loadingTableData
=
async
(
params
)
=>
{
const
_params
=
{
...
params
};
_params
.
reconciliationId
=
id
;
_params
.
reconciliationNo
=
no
;
const
{
data
}
=
await
getSettleAccountsBusinessReconciliationReconciliationRowList
(
_params
)
return
data
}
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
>
}
/>
)
}
export
default
SearchDetail
;
src/pages/balance/businessReconciliation/readyAdd/add.tsx
View file @
6ba1a5d4
This diff is collapsed.
Click to expand it.
src/pages/balance/businessReconciliation/readyAdd/index.tsx
View file @
6ba1a5d4
...
...
@@ -11,12 +11,14 @@ import NiceForm from '@/components/NiceForm'
import
StatusTag
from
'@/components/StatusTag'
;
import
{
formatTimeString
}
from
'@/utils'
import
{
priceFormat
}
from
'@/utils/numberFomat'
import
{
createFormActions
}
from
'@formily/antd'
import
{
getIntl
}
from
'umi'
;
import
{
getIntl
,
history
,
Link
}
from
'umi'
;
import
{
getSettleAccountsBusinessReconciliationToSaveReconciliationList
,
postSettleAccountsBusinessReconciliationSubmitReconciliation
,
postSettleAccountsBusinessReconciliationDeleteReconciliation
}
from
'@/services/SettleV2Api'
const
intl
=
getIntl
();
const
{
Link
,
Text
}
=
Typography
;
const
{
Text
}
=
Typography
;
// 待新增对账单
...
...
@@ -24,80 +26,106 @@ const formActions = createFormActions();
const
ReadyAdd
:
React
.
FC
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
// const loadingTableData = (params) => {
// const { data } = await getPurchaseRequisitionPage(params)
// return data
// }
const
loadingTableData
=
async
(
params
)
=>
{
const
_params
=
{
...
params
};
if
(
params
.
createTimeStart
)
{
_params
.
createTimeStart
=
formatTimeString
(
Number
(
params
.
createTimeStart
),
'YYYY-MM-DD'
);
}
if
(
params
.
createTimeEnd
)
{
_params
.
createTimeEnd
=
formatTimeString
(
Number
(
params
.
createTimeEnd
),
'YYYY-MM-DD'
);
}
const
{
data
}
=
await
getSettleAccountsBusinessReconciliationToSaveReconciliationList
(
_params
)
return
data
}
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
intl
.
formatMessage
({
id
:
'balance.duizhangdanhao'
}),
key
:
'
order
No'
,
dataIndex
:
'
order
No'
,
title
:
intl
.
formatMessage
({
id
:
'balance.duizhangdanhao'
}),
key
:
'
reconciliation
No'
,
dataIndex
:
'
reconciliation
No'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Link
>
{
text
}
</
Link
>
<
Link
to=
{
`readyAdd/preview?id=${record.reconciliationId}&no=${text}`
}
>
{
text
}
</
Link
>
)
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.danjuzhaiyao'
}),
key
:
'
details
'
,
dataIndex
:
'
details
'
,
title
:
intl
.
formatMessage
({
id
:
'balance.danjuzhaiyao'
}),
key
:
'
reconciliationAbstract
'
,
dataIndex
:
'
reconciliationAbstract
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
direction=
'vertical'
style=
{
{
width
:
300
}
}
>
<
Text
type=
'secondary'
>
{
text
}
</
Text
>
</
Space
>
)
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.fukuanfang'
}),
key
:
'paye
e
'
,
dataIndex
:
'paye
e
'
,
title
:
intl
.
formatMessage
({
id
:
'balance.fukuanfang'
}),
key
:
'paye
r
'
,
dataIndex
:
'paye
r
'
,
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.duizhangzongjinehanshui'
}),
key
:
'total'
,
dataIndex
:
'total'
,
render
:
(
text
:
any
,
record
:
any
)
=>
`¥
${
priceFormat
(
text
)}
`
,
width
:
180
title
:
intl
.
formatMessage
({
id
:
'balance.duizhangzongjinehanshui'
}),
key
:
'reconciliationMoneyAmount'
,
dataIndex
:
'reconciliationMoneyAmount'
,
render
:
(
text
:
any
)
=>
`¥
${
priceFormat
(
text
)}
`
,
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.danjushijian'
}),
title
:
intl
.
formatMessage
({
id
:
'balance.danjushijian'
}),
key
:
'createTime'
,
dataIndex
:
'createTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
formatTimeString
(
text
,
'YYYY-MM-DD HH:mm'
),
render
:
(
text
:
any
)
=>
formatTimeString
(
text
,
'YYYY-MM-DD HH:mm'
),
width
:
180
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.waibuzhuangtai'
}),
key
:
'
externalState
'
,
dataIndex
:
'
externalState
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
StatusTag
type=
'default'
title=
{
record
.
externalStateName
}
/>
title
:
intl
.
formatMessage
({
id
:
'balance.waibuzhuangtai'
}),
key
:
'
status
'
,
dataIndex
:
'
status
'
,
render
:
(
text
:
any
)
=>
<
StatusTag
type=
'primary'
title=
{
text
}
/>
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.caozuo'
}),
title
:
intl
.
formatMessage
({
id
:
'balance.caozuo'
}),
dataIndex
:
'operate'
,
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<>
{
record
.
button
===
1
&&
<
Popconfirm
title=
{
intl
.
formatMessage
({
id
:
'balance.quedingyaotijiaoma'
})
}
okText=
{
intl
.
formatMessage
({
id
:
'balance.shi'
})
}
cancelText=
{
intl
.
formatMessage
({
id
:
'balance.fou'
})
}
onConfirm=
{
()
=>
fetchSubmitBatch
(
record
.
i
d
)
}
>
{
record
.
button
===
1
&&
<
Popconfirm
title=
{
intl
.
formatMessage
({
id
:
'balance.quedingyaotijiaoma'
})
}
okText=
{
intl
.
formatMessage
({
id
:
'balance.shi'
})
}
cancelText=
{
intl
.
formatMessage
({
id
:
'balance.fou'
})
}
onConfirm=
{
()
=>
fetchSubmitBatch
(
record
.
reconciliationI
d
)
}
>
<
Button
type=
'link'
>
{
intl
.
formatMessage
({
id
:
'balance.tijiao'
})
}
{
intl
.
formatMessage
({
id
:
'balance.tijiao'
})
}
</
Button
>
</
Popconfirm
>
}
<
Dropdown
overlay=
{
()
=>
(
<
Menu
onClick=
{
(
e
)
=>
handleMenuClick
(
e
,
record
)
}
>
<
Menu
.
Item
key=
"1"
>
{
intl
.
formatMessage
({
id
:
'balance.bianji'
})
}
</
Menu
.
Item
>
<
Menu
.
Item
key=
"2"
disabled=
{
!
(
record
.
button
===
1
)
}
>
{
intl
.
formatMessage
({
id
:
'balance.shanchu'
})
}
</
Menu
.
Item
>
<
Menu
.
Item
key=
"1"
>
{
intl
.
formatMessage
({
id
:
'balance.bianji'
})
}
</
Menu
.
Item
>
<
Popconfirm
title=
{
intl
.
formatMessage
({
id
:
'balance.quedingyaotijiaoma'
})
}
okText=
{
intl
.
formatMessage
({
id
:
'balance.shi'
})
}
cancelText=
{
intl
.
formatMessage
({
id
:
'balance.fou'
})
}
onConfirm=
{
()
=>
fetchDelete
(
record
.
reconciliationId
)
}
>
<
Menu
.
Item
key=
"2"
>
{
intl
.
formatMessage
({
id
:
'balance.shanchu'
})
}
</
Menu
.
Item
>
</
Popconfirm
>
</
Menu
>
)
}
>
<
Button
type=
'link'
>
{
intl
.
formatMessage
({
id
:
'balance.gengduo'
})
}
<
CaretDownOutlined
/></
Button
>
<
Button
type=
'link'
>
{
intl
.
formatMessage
({
id
:
'balance.gengduo'
})
}
<
CaretDownOutlined
/></
Button
>
</
Dropdown
>
</>
}];
const
fetchSubmitBatch
=
(
id
:
number
)
=>
{
}
const
fetchSubmitBatch
=
(
id
:
number
)
=>
{
postSettleAccountsBusinessReconciliationSubmitReconciliation
({
reconciliationId
:
id
}).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
}
})
}
const
fetchDelete
=
(
id
:
string
)
=>
{
postSettleAccountsBusinessReconciliationDeleteReconciliation
({
id
:
id
}).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
}
})
}
const
handleMenuClick
=
(
e
:
any
,
record
:
any
)
=>
{
}
const
handleMenuClick
=
(
e
:
any
,
record
:
any
)
=>
{
if
(
e
.
key
===
'1'
)
{
history
.
push
(
`/memberCenter/balance/businessReconciliation/readyAdd/edit?id=
${
record
.
reconciliationId
}
&no=
${
record
.
reconciliationNo
}
`
)
}
}
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
//
fetchTableData={params => loadingTableData(params)}
fetchTableData=
{
params
=>
loadingTableData
(
params
)
}
columns=
{
columns
}
currentRef=
{
ref
}
rowKey=
"id"
...
...
@@ -109,7 +137,7 @@ const ReadyAdd: React.FC = () => {
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'
order
No'
,
'
reconciliation
No'
,
FORM_FILTER_PATH
,
)
}
}
...
...
@@ -123,12 +151,13 @@ const ReadyAdd: React.FC = () => {
grid
:
true
},
properties
:
{
order
No
:
{
reconciliation
No
:
{
type
:
'string'
,
"x-component"
:
'Search'
,
'x-component-props'
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshuruduizhangdanhao'
}),
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshuruduizhangdanhao'
}),
align
:
'flex-start'
,
allowClear
:
true
,
},
},
}
...
...
@@ -147,29 +176,32 @@ const ReadyAdd: React.FC = () => {
},
properties
:
{
"
diges
t"
:
{
"
reconciliationAbstrac
t"
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshuruduizhangdanzhaiyao'
}),
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshuruduizhangdanzhaiyao'
}),
allowClear
:
true
,
}
},
"
memberName
"
:
{
"
payer
"
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshurufukuanfang'
})
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshurufukuanfang'
}),
allowClear
:
true
,
}
},
"[
startDate,endDate
]"
:
{
"[
createTimeStart,createTimeEnd
]"
:
{
type
:
'string'
,
"x-component"
:
"dateSelect"
,
"x-component-props"
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'balance.danjushijianquanbu'
}),
placeholder
:
intl
.
formatMessage
({
id
:
'balance.danjushijianquanbu'
}),
allowClear
:
true
,
}
},
submit
:
{
'x-component'
:
'Submit'
,
'x-component-props'
:
{
children
:
intl
.
formatMessage
({
id
:
'balance.chaxun'
}),
children
:
intl
.
formatMessage
({
id
:
'balance.chaxun'
}),
},
},
},
...
...
src/pages/balance/businessReconciliation/readyReconciliation/index.tsx
View file @
6ba1a5d4
This diff is collapsed.
Click to expand it.
src/pages/balance/businessReconciliation/search/index.tsx
View file @
6ba1a5d4
...
...
@@ -5,18 +5,22 @@ import { StandardTable } from 'god'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
import
Submit
from
'@/components/NiceForm/components/Submit'
import
NiceForm
from
'@/components/NiceForm'
import
StatusTag
from
'@/components/StatusTag'
;
import
{
formatTimeString
}
from
'@/utils'
import
{
priceFormat
}
from
'@/utils/numberFomat'
import
{
getAuth
}
from
'@/utils/auth'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
;
import
{
getSettleAccountsBusinessReconciliationVendorReconciliationList
,
getSettleAccountsBusinessReconciliationItemReconciliationStatus
,
getSettleAccountsBusinessReconciliationVendorReconciliationExport
}
from
'@/services/SettleV2Api'
import
{
createFormActions
}
from
'@formily/antd'
import
{
getIntl
}
from
'umi'
;
import
{
getIntl
,
Link
}
from
'umi'
;
import
{
fetchOptions
}
from
'../../common'
;
const
intl
=
getIntl
();
const
{
Link
,
Text
}
=
Typography
;
const
{
Text
}
=
Typography
;
// 对账单查询
...
...
@@ -24,61 +28,75 @@ const formActions = createFormActions();
const
Search
:
React
.
FC
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
// const loadingTableData = (params) => {
// const { data } = await getPurchaseRequisitionPage(params)
// return data
// }
/**多选 */
const
[
selectRow
,
selectRowFns
]
=
useRowSelectionTable
({
customKey
:
'id'
,
});
const
[
exportParam
,
setExportParam
]
=
useState
<
any
>
({});
const
{
token
}
=
(
getAuth
()
||
{})
const
loadingTableData
=
async
(
params
)
=>
{
const
_params
=
{
...
params
};
if
(
params
.
createTimeStart
)
{
_params
.
createTimeStart
=
formatTimeString
(
Number
(
params
.
createTimeStart
),
'YYYY-MM-DD'
);
}
if
(
params
.
createTimeEnd
)
{
_params
.
createTimeEnd
=
formatTimeString
(
Number
(
params
.
createTimeEnd
),
'YYYY-MM-DD'
);
}
setExportParam
(
_params
);
const
{
data
}
=
await
getSettleAccountsBusinessReconciliationVendorReconciliationList
(
_params
)
return
data
}
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
intl
.
formatMessage
({
id
:
'balance.duizhangdanhao'
}),
key
:
'
order
No'
,
dataIndex
:
'
order
No'
,
title
:
intl
.
formatMessage
({
id
:
'balance.duizhangdanhao'
}),
key
:
'
reconciliation
No'
,
dataIndex
:
'
reconciliation
No'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Link
>
{
text
}
</
Link
>
<
Link
to=
{
`search/preview?id=${record.reconciliationId}&no=${text}`
}
>
{
text
}
</
Link
>
)
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.danjuzhaiyao'
}),
key
:
'
details
'
,
dataIndex
:
'
details
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
title
:
intl
.
formatMessage
({
id
:
'balance.danjuzhaiyao'
}),
key
:
'
reconciliationAbstract
'
,
dataIndex
:
'
reconciliationAbstract
'
,
render
:
(
text
:
any
)
=>
(
<
Space
direction=
'vertical'
style=
{
{
width
:
300
}
}
>
<
Text
type=
'secondary'
>
{
text
}
</
Text
>
</
Space
>
)
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.fukuanfang'
}),
key
:
'paye
e
'
,
dataIndex
:
'paye
e
'
,
title
:
intl
.
formatMessage
({
id
:
'balance.fukuanfang'
}),
key
:
'paye
r
'
,
dataIndex
:
'paye
r
'
,
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.duizhangzongjinehanshui'
}),
key
:
'total'
,
dataIndex
:
'total'
,
render
:
(
text
:
any
,
record
:
any
)
=>
`¥
${
priceFormat
(
text
)}
`
,
width
:
180
title
:
intl
.
formatMessage
({
id
:
'balance.duizhangzongjinehanshui'
}),
key
:
'reconciliationMoneyAmount'
,
dataIndex
:
'reconciliationMoneyAmount'
,
render
:
(
text
:
any
)
=>
`¥
${
priceFormat
(
text
)}
`
,
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.danjushijian'
}),
title
:
intl
.
formatMessage
({
id
:
'balance.danjushijian'
}),
key
:
'createTime'
,
dataIndex
:
'createTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
formatTimeString
(
text
,
'YYYY-MM-DD HH:mm'
),
render
:
(
text
:
any
)
=>
formatTimeString
(
text
,
'YYYY-MM-DD HH:mm'
),
width
:
180
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.waibuzhuangtai'
}),
key
:
'
externalState
'
,
dataIndex
:
'
externalState
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
StatusTag
type=
'default'
title=
{
record
.
externalStateName
}
/>
title
:
intl
.
formatMessage
({
id
:
'balance.waibuzhuangtai'
}),
key
:
'
status
'
,
dataIndex
:
'
status
'
,
render
:
(
text
:
any
)
=>
<
StatusTag
type=
'primary'
title=
{
text
}
/>
}];
const
_exportFunc
=
()
=>
{
const
p
=
{
...
exportParam
};
let
exportParams
=
''
;
Object
.
keys
(
p
).
forEach
(
item
=>
{
if
(
p
[
item
])
{
exportParams
+=
`&
${
item
}
=
${
p
[
item
]}
`
}
})
window
.
open
(
`
${
process
.
env
.
BACK_GATEWAY
}
/settle/accounts/business/reconciliation/vendor/reconciliation/export?token=
${
token
}${
exportParams
}
`
,
'_blank'
)
}
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
// fetchTableData={params => loadingTableData(params)}
rowSelection=
{
selectRow
}
fetchTableData=
{
params
=>
loadingTableData
(
params
)
}
columns=
{
columns
}
currentRef=
{
ref
}
rowKey=
"id"
...
...
@@ -90,9 +108,13 @@ const Search: React.FC = () => {
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'
order
No'
,
'
reconciliation
No'
,
FORM_FILTER_PATH
,
)
useAsyncSelect
(
'status'
,
fetchOptions
(
getSettleAccountsBusinessReconciliationItemReconciliationStatus
),
);
}
}
schema=
{
{
type
:
'object'
,
...
...
@@ -108,12 +130,13 @@ const Search: React.FC = () => {
type
:
"object"
,
"x-component"
:
"controllerBtns"
,
},
order
No
:
{
reconciliation
No
:
{
type
:
'string'
,
"x-component"
:
'Search'
,
'x-component-props'
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshuruduizhangdanhao'
}),
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshuruduizhangdanhao'
}),
align
:
'flex-end'
,
allowClear
:
true
,
},
},
}
...
...
@@ -131,43 +154,40 @@ const Search: React.FC = () => {
},
properties
:
{
"
diges
t"
:
{
"
reconciliationAbstrac
t"
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshuruduizhangdanzhaiyao'
}),
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshuruduizhangdanzhaiyao'
}),
allowClear
:
true
,
}
},
"
memberName
"
:
{
"
payer
"
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshurufukuanfang'
})
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshurufukuanfang'
}),
allowClear
:
true
,
}
},
"
innerS
tatus"
:
{
"
s
tatus"
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingxuanzezhuangtai'
})
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingxuanzezhuangtai'
}),
allowClear
:
true
,
},
enum
:
[
{
label
:
'所有'
,
value
:
''
},
{
label
:
'待提交'
,
value
:
1
},
{
label
:
'待确认'
,
value
:
2
},
{
label
:
'确认不通过'
,
value
:
3
},
{
label
:
'待请款'
,
value
:
4
},
{
label
:
'已请款'
,
value
:
5
},
]
enum
:
[]
},
"[
startDate,endDate
]"
:
{
"[
createTimeStart,createTimeEnd
]"
:
{
type
:
'string'
,
"x-component"
:
"dateSelect"
,
"x-component-props"
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'balance.danjushijianquanbu'
}),
placeholder
:
intl
.
formatMessage
({
id
:
'balance.danjushijianquanbu'
}),
allowClear
:
true
,
}
},
submit
:
{
'x-component'
:
'Submit'
,
'x-component-props'
:
{
children
:
intl
.
formatMessage
({
id
:
'balance.chaxun'
}),
children
:
intl
.
formatMessage
({
id
:
'balance.chaxun'
}),
},
},
},
...
...
@@ -178,7 +198,7 @@ const Search: React.FC = () => {
Submit
,
controllerBtns
:
()
=>
(
<
Space
>
<
Button
size=
'middle'
>
{
intl
.
formatMessage
({
id
:
'balance.daochu'
})
}
</
Button
>
<
Button
size=
'middle'
onClick=
{
_exportFunc
}
>
{
intl
.
formatMessage
({
id
:
'balance.daochu'
})
}
</
Button
>
</
Space
>
),
}
}
...
...
src/pages/balance/businessReconciliationCollaboration/components/modalOperate/index.less
0 → 100644
View file @
6ba1a5d4
.revise_style {
:global {
.ant-form-item-label {
label {
&::before {
margin-left: 1px;
}
}
}
}
}
src/pages/balance/businessReconciliationCollaboration/components/modalOperate/index.tsx
0 → 100644
View file @
6ba1a5d4
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Modal
}
from
'antd'
;
import
{
SchemaForm
,
SchemaMarkupField
as
Field
,
createFormActions
,
FormEffectHooks
,
}
from
'@formily/antd'
import
{
Input
,
Radio
,
DatePicker
,
Checkbox
}
from
'@formily/antd-components'
import
styles
from
'./index.less'
;
import
{
getIntl
}
from
'umi'
;
const
intl
=
getIntl
();
const
actions
=
createFormActions
()
const
{
onFieldChange$
}
=
FormEffectHooks
;
export
interface
IProps
{
title
:
string
,
visible
:
boolean
,
id
:
number
,
onCancel
?:
()
=>
void
,
onOk
?:
()
=>
void
,
fetch
?:
()
=>
Promise
<
unknown
>
,
maxNumber
?:
number
}
const
ModalOperate
:
React
.
FC
<
IProps
>
=
(
props
:
any
)
=>
{
const
{
title
,
visible
,
id
,
onCancel
,
onOk
,
fetch
,
maxNumber
,
}
=
props
;
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
<
boolean
>
(
false
);
const
useFormEffects
=
()
=>
{
onFieldChange$
(
'state'
).
subscribe
(({
value
})
=>
{
actions
.
setFieldState
(
'auditOpinion'
,
state
=>
{
if
(
value
==
1
)
{
state
.
visible
=
false
}
else
{
state
.
visible
=
true
}
})
})
}
const
modalText
=
()
=>
{
return
intl
.
formatMessage
({
id
:
'detail.purchase.message84'
});
}
const
modalNode
=
()
=>
{
return
<
Field
enum=
{
[
{
label
:
intl
.
formatMessage
({
id
:
'detail.purchase.message86'
}),
value
:
1
},
{
label
:
intl
.
formatMessage
({
id
:
'detail.purchase.message87'
}),
value
:
0
}
]
}
name=
'state'
required
x
-
component=
"Radio"
x
-
component
-
props=
{
{}
}
/>
}
useEffect
(()
=>
{
actions
.
clearErrors
();
},
[
visible
])
const
handleSubmit
=
(
val
:
any
)
=>
{
if
(
confirmLoading
)
{
return
;
}
setConfirmLoading
(
true
);
let
value
=
{
...
val
}
let
params
:
any
=
{}
params
.
state
=
value
.
state
;
value
.
state
!==
1
&&
(
params
.
auditOpinion
=
value
.
auditOpinion
);
fetch
({
id
,
...
params
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
onOk
&&
onOk
()
}
}).
finally
(()
=>
{
setConfirmLoading
(
false
);
})
}
const
handleClose
=
()
=>
{
onCancel
();
actions
.
reset
();
}
return
(
<
Modal
width=
{
600
}
title=
{
title
}
visible=
{
visible
}
onCancel=
{
handleClose
}
onOk=
{
()
=>
actions
.
submit
()
}
afterClose=
{
()
=>
actions
.
reset
()
}
confirmLoading=
{
confirmLoading
}
>
<
SchemaForm
className=
{
styles
.
revise_style
}
layout=
"vertical"
labelCol=
{
6
}
components=
{
{
Input
,
Radio
:
Radio
.
Group
,
TextArea
:
Input
.
TextArea
,
DatePicker
,
Checkbox
,
CheckboxGroup
:
Checkbox
.
Group
}
}
actions=
{
actions
}
effects=
{
()
=>
useFormEffects
()
}
onSubmit=
{
(
values
)
=>
handleSubmit
(
values
)
}
initialValues=
{
{
state
:
1
,
status
:
1
}
}
>
{
modalNode
()
}
<
Field
title=
{
modalText
()
}
name=
{
'auditOpinion'
}
x
-
component=
"TextArea"
required
x
-
component
-
props=
{
{
placeholder
:
`${intl.formatMessage({ id: 'detail.purchase.tips17' })}${maxNumber}${intl.formatMessage({ id: 'detail.purchase.tips18' })}`
}
}
x
-
rules=
{
{
validator
:
(
value
)
=>
{
let
_str
=
value
;
_str
=
_str
.
replace
(
/
[\u
4E00-
\u
9FA5
]
/g
,
"AA"
);
if
(
_str
.
length
>
maxNumber
*
2
)
{
return
{
type
:
'error'
,
message
:
`${intl.formatMessage({ id: 'detail.purchase.tips19' })}${maxNumber * 2}${intl.formatMessage({ id: 'detail.purchase.tips20' })},${maxNumber}${intl.formatMessage({ id: 'detail.purchase.tips18' })}`
};
}
else
{
return
null
;
}
}
}
}
/>
</
SchemaForm
>
</
Modal
>
)
}
ModalOperate
.
defaultProps
=
{
maxNumber
:
60
}
export
default
ModalOperate
;
src/pages/balance/businessReconciliationCollaboration/readyConfirm/index.tsx
View file @
6ba1a5d4
...
...
@@ -10,7 +10,7 @@ import NiceForm from '@/components/NiceForm'
import
StatusTag
from
'@/components/StatusTag'
;
import
{
formatTimeString
}
from
'@/utils'
import
{
priceFormat
}
from
'@/utils/numberFomat'
import
{
getSettleAccountsBusinessReconciliationTeamworkConfirmReconciliationList
}
from
'@/services/SettleV2Api'
import
{
createFormActions
}
from
'@formily/antd'
import
{
getIntl
}
from
'umi'
;
...
...
@@ -23,60 +23,69 @@ const formActions = createFormActions();
const
ReadyConfirm
:
React
.
FC
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
// const loadingTableData = (params) => {
// const { data } = await getPurchaseRequisitionPage(params)
// return data
// }
const
loadingTableData
=
async
(
params
)
=>
{
const
_params
=
{
...
params
};
if
(
!
params
.
reconciliationNo
)
{
delete
_params
.
reconciliationNo
;
}
if
(
params
.
createTimeStart
)
{
_params
.
createTimeStart
=
formatTimeString
(
Number
(
params
.
createTimeStart
),
'YYYY-MM-DD'
);
}
if
(
params
.
createTimeEnd
)
{
_params
.
createTimeEnd
=
formatTimeString
(
Number
(
params
.
createTimeEnd
),
'YYYY-MM-DD'
);
}
const
{
data
}
=
await
getSettleAccountsBusinessReconciliationTeamworkConfirmReconciliationList
(
_params
)
return
data
}
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
intl
.
formatMessage
({
id
:
'balance.duizhangdanhao'
}),
key
:
'
order
No'
,
dataIndex
:
'
order
No'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
title
:
intl
.
formatMessage
({
id
:
'balance.duizhangdanhao'
}),
key
:
'
reconciliation
No'
,
dataIndex
:
'
reconciliation
No'
,
render
:
(
text
:
any
)
=>
(
<
Link
>
{
text
}
</
Link
>
)
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.danjuzhaiyao'
}),
key
:
'
details
'
,
dataIndex
:
'
details
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
title
:
intl
.
formatMessage
({
id
:
'balance.danjuzhaiyao'
}),
key
:
'
reconciliationAbstract
'
,
dataIndex
:
'
reconciliationAbstract
'
,
render
:
(
text
:
any
)
=>
(
<
Space
direction=
'vertical'
style=
{
{
width
:
300
}
}
>
<
Text
type=
'secondary'
>
{
text
}
</
Text
>
</
Space
>
)
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.shoukuanfang'
}),
title
:
intl
.
formatMessage
({
id
:
'balance.shoukuanfang'
}),
key
:
'payee'
,
dataIndex
:
'payee'
,
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.duizhangzongjinehanshui'
}),
key
:
'total'
,
dataIndex
:
'total'
,
render
:
(
text
:
any
,
record
:
any
)
=>
`¥
${
priceFormat
(
text
)}
`
,
width
:
180
title
:
intl
.
formatMessage
({
id
:
'balance.duizhangzongjinehanshui'
}),
key
:
'reconciliationMoneyAmount'
,
dataIndex
:
'reconciliationMoneyAmount'
,
render
:
(
text
:
any
)
=>
`¥
${
priceFormat
(
text
)}
`
,
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.danjushijian'
}),
title
:
intl
.
formatMessage
({
id
:
'balance.danjushijian'
}),
key
:
'createTime'
,
dataIndex
:
'createTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
formatTimeString
(
text
,
'YYYY-MM-DD HH:mm'
),
render
:
(
text
:
any
)
=>
formatTimeString
(
text
,
'YYYY-MM-DD HH:mm'
),
width
:
180
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.waibuzhuangtai'
}),
key
:
'
externalState
'
,
dataIndex
:
'
externalState
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
StatusTag
type=
'default'
title=
{
record
.
externalStateName
}
/>
title
:
intl
.
formatMessage
({
id
:
'balance.waibuzhuangtai'
}),
key
:
'
status
'
,
dataIndex
:
'
status
'
,
render
:
(
text
:
any
)
=>
<
StatusTag
type=
'primary'
title=
{
text
}
/>
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.caozuo'
}),
title
:
intl
.
formatMessage
({
id
:
'balance.caozuo'
}),
key
:
'operate'
,
dataIndex
:
'operate'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Button
type=
'link'
>
{
intl
.
formatMessage
({
id
:
'balance.queren'
})
}
</
Button
>
render
:
(
text
:
any
)
=>
<
Button
type=
'link'
>
{
intl
.
formatMessage
({
id
:
'balance.queren'
})
}
</
Button
>
}];
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
//
fetchTableData={params => loadingTableData(params)}
fetchTableData=
{
params
=>
loadingTableData
(
params
)
}
columns=
{
columns
}
currentRef=
{
ref
}
rowKey=
"id"
...
...
@@ -88,7 +97,7 @@ const ReadyConfirm: React.FC = () => {
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'
order
No'
,
'
reconciliation
No'
,
FORM_FILTER_PATH
,
)
}
}
...
...
@@ -102,12 +111,13 @@ const ReadyConfirm: React.FC = () => {
grid
:
true
},
properties
:
{
order
No
:
{
reconciliation
No
:
{
type
:
'string'
,
"x-component"
:
'Search'
,
'x-component-props'
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshuruduizhangdanhao'
}),
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshuruduizhangdanhao'
}),
align
:
'flex-start'
,
allowClear
:
true
,
},
},
}
...
...
@@ -125,29 +135,32 @@ const ReadyConfirm: React.FC = () => {
}
},
properties
:
{
"
diges
t"
:
{
"
reconciliationAbstrac
t"
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshuruduizhangdanzhaiyao'
}),
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshuruduizhangdanzhaiyao'
}),
allowClear
:
true
,
}
},
"
memberNam
e"
:
{
"
paye
e"
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshurushoukuanfang'
})
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshurushoukuanfang'
}),
allowClear
:
true
,
}
},
"[
startDate,endDate
]"
:
{
"[
createTimeStart,createTimeEnd
]"
:
{
type
:
'string'
,
"x-component"
:
"dateSelect"
,
"x-component-props"
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'balance.danjushijianquanbu'
}),
placeholder
:
intl
.
formatMessage
({
id
:
'balance.danjushijianquanbu'
}),
allowClear
:
true
,
}
},
submit
:
{
'x-component'
:
'Submit'
,
'x-component-props'
:
{
children
:
intl
.
formatMessage
({
id
:
'balance.chaxun'
}),
children
:
intl
.
formatMessage
({
id
:
'balance.chaxun'
}),
},
},
},
...
...
src/pages/balance/businessReconciliationCollaboration/readyPay/index.tsx
View file @
6ba1a5d4
...
...
@@ -10,35 +10,45 @@ import NiceForm from '@/components/NiceForm'
import
StatusTag
from
'@/components/StatusTag'
;
import
{
formatTimeString
}
from
'@/utils'
import
{
priceFormat
}
from
'@/utils/numberFomat'
import
{
getSettleAccountsBusinessReconciliationTeamworkTobeApplyamountList
}
from
'@/services/SettleV2Api'
import
{
createFormActions
}
from
'@formily/antd'
import
{
getIntl
}
from
'umi'
;
const
intl
=
getIntl
();
const
{
Link
,
Text
}
=
Typography
;
//
对账单查询
//
待请款
const
formActions
=
createFormActions
();
const
ReadyPay
:
React
.
FC
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
// const loadingTableData = (params) => {
// const { data } = await getPurchaseRequisitionPage(params)
// return data
// }
const
loadingTableData
=
async
(
params
)
=>
{
const
_params
=
{
...
params
};
if
(
!
params
.
reconciliationNo
)
{
delete
_params
.
reconciliationNo
;
}
if
(
params
.
createTimeStart
)
{
_params
.
createTimeStart
=
formatTimeString
(
Number
(
params
.
createTimeStart
),
'YYYY-MM-DD'
);
}
if
(
params
.
createTimeEnd
)
{
_params
.
createTimeEnd
=
formatTimeString
(
Number
(
params
.
createTimeEnd
),
'YYYY-MM-DD'
);
}
const
{
data
}
=
await
getSettleAccountsBusinessReconciliationTeamworkTobeApplyamountList
(
_params
)
return
data
}
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
intl
.
formatMessage
({
id
:
'balance.duizhangdanhao'
}),
key
:
'
order
No'
,
dataIndex
:
'
order
No'
,
key
:
'
reconciliation
No'
,
dataIndex
:
'
reconciliation
No'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Link
>
{
text
}
</
Link
>
)
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.danjuzhaiyao'
}),
key
:
'
details
'
,
dataIndex
:
'
details
'
,
key
:
'
reconciliationAbstract
'
,
dataIndex
:
'
reconciliationAbstract
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
direction=
'vertical'
style=
{
{
width
:
300
}
}
>
<
Text
type=
'secondary'
>
{
text
}
</
Text
>
...
...
@@ -50,10 +60,9 @@ const ReadyPay: React.FC = () => {
dataIndex
:
'payee'
,
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.duizhangzongjinehanshui'
}),
key
:
'
total
'
,
dataIndex
:
'
total
'
,
key
:
'
reconciliationMoneyAmount
'
,
dataIndex
:
'
reconciliationMoneyAmount
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
`¥
${
priceFormat
(
text
)}
`
,
width
:
180
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.danjushijian'
}),
key
:
'createTime'
,
...
...
@@ -62,9 +71,9 @@ const ReadyPay: React.FC = () => {
width
:
180
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.waibuzhuangtai'
}),
key
:
'
externalState
'
,
dataIndex
:
'
externalState
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
StatusTag
type=
'
default'
title=
{
record
.
externalStateName
}
/>
key
:
'
status
'
,
dataIndex
:
'
status
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
StatusTag
type=
'
primary'
title=
{
text
}
/>
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.caozuo'
}),
key
:
'operate'
,
...
...
@@ -76,7 +85,7 @@ const ReadyPay: React.FC = () => {
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
//
fetchTableData={params => loadingTableData(params)}
fetchTableData=
{
params
=>
loadingTableData
(
params
)
}
columns=
{
columns
}
currentRef=
{
ref
}
rowKey=
"id"
...
...
@@ -88,7 +97,7 @@ const ReadyPay: React.FC = () => {
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'
order
No'
,
'
reconciliation
No'
,
FORM_FILTER_PATH
,
)
}
}
...
...
@@ -102,12 +111,13 @@ const ReadyPay: React.FC = () => {
grid
:
true
},
properties
:
{
order
No
:
{
reconciliation
No
:
{
type
:
'string'
,
"x-component"
:
'Search'
,
'x-component-props'
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshuruduizhangdanhao'
}),
align
:
'flex-start'
,
allowClear
:
true
,
},
},
}
...
...
@@ -125,23 +135,26 @@ const ReadyPay: React.FC = () => {
}
},
properties
:
{
"
diges
t"
:
{
"
reconciliationAbstrac
t"
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshuruduizhangdanzhaiyao'
}),
allowClear
:
true
,
}
},
"
memberNam
e"
:
{
"
paye
e"
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshurushoukuanfang'
})
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshurushoukuanfang'
}),
allowClear
:
true
,
}
},
"[
startDate,endDate
]"
:
{
"[
createTimeStart,createTimeEnd
]"
:
{
type
:
'string'
,
"x-component"
:
"dateSelect"
,
"x-component-props"
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'balance.danjushijianquanbu'
}),
allowClear
:
true
,
}
},
submit
:
{
...
...
src/pages/balance/businessReconciliationCollaboration/search/index.tsx
View file @
6ba1a5d4
...
...
@@ -11,12 +11,12 @@ import StatusTag from '@/components/StatusTag';
import
{
formatTimeString
}
from
'@/utils'
import
{
priceFormat
}
from
'@/utils/numberFomat'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
;
import
{
getSettleAccountsBusinessReconciliationTeamworkBuyerReconciliationList
,
getSettleAccountsBusinessReconciliationTeamworkBuyerReconciliationExport
}
from
'@/services/SettleV2Api'
import
{
createFormActions
}
from
'@formily/antd'
import
{
getIntl
}
from
'umi'
;
import
{
getIntl
,
Link
}
from
'umi'
;
const
intl
=
getIntl
();
const
{
Link
,
Text
}
=
Typography
;
const
{
Text
}
=
Typography
;
// 对账单查询
...
...
@@ -24,61 +24,71 @@ const formActions = createFormActions();
const
Search
:
React
.
FC
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
// const loadingTableData = (params) => {
// const { data } = await getPurchaseRequisitionPage(params)
// return data
// }
const
[
exportParams
,
setExportParams
]
=
useState
<
any
>
({});
/**多选 */
const
[
selectRow
,
selectRowFns
]
=
useRowSelectionTable
({
customKey
:
'id'
,
});
const
loadingTableData
=
async
(
params
)
=>
{
const
_params
=
{
...
params
};
if
(
!
params
.
reconciliationNo
)
{
delete
_params
.
reconciliationNo
;
}
if
(
params
.
createTimeStart
)
{
_params
.
createTimeStart
=
formatTimeString
(
Number
(
params
.
createTimeStart
),
'YYYY-MM-DD'
);
}
if
(
params
.
createTimeEnd
)
{
_params
.
createTimeEnd
=
formatTimeString
(
Number
(
params
.
createTimeEnd
),
'YYYY-MM-DD'
);
}
setExportParams
(
_params
);
const
{
data
}
=
await
getSettleAccountsBusinessReconciliationTeamworkBuyerReconciliationList
(
_params
)
return
data
}
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
intl
.
formatMessage
({
id
:
'balance.duizhangdanhao'
}),
key
:
'
order
No'
,
dataIndex
:
'
order
No'
,
title
:
intl
.
formatMessage
({
id
:
'balance.duizhangdanhao'
}),
key
:
'
reconciliation
No'
,
dataIndex
:
'
reconciliation
No'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Link
>
{
text
}
</
Link
>
<
Link
to=
{
`search/preview?id=${record.id}`
}
>
{
text
}
</
Link
>
)
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.danjuzhaiyao'
}),
key
:
'
details
'
,
dataIndex
:
'
details
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
title
:
intl
.
formatMessage
({
id
:
'balance.danjuzhaiyao'
}),
key
:
'
reconciliationAbstract
'
,
dataIndex
:
'
reconciliationAbstract
'
,
render
:
(
text
:
any
)
=>
(
<
Space
direction=
'vertical'
style=
{
{
width
:
300
}
}
>
<
Text
type=
'secondary'
>
{
text
}
</
Text
>
</
Space
>
)
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.shoukuanfang'
}),
title
:
intl
.
formatMessage
({
id
:
'balance.shoukuanfang'
}),
key
:
'payee'
,
dataIndex
:
'payee'
,
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.duizhangzongjinehanshui'
}),
key
:
'total'
,
dataIndex
:
'total'
,
render
:
(
text
:
any
,
record
:
any
)
=>
`¥
${
priceFormat
(
text
)}
`
,
width
:
180
title
:
intl
.
formatMessage
({
id
:
'balance.duizhangzongjinehanshui'
}),
key
:
'reconciliationMoneyAmount'
,
dataIndex
:
'reconciliationMoneyAmount'
,
render
:
(
text
:
any
)
=>
`¥
${
priceFormat
(
text
)}
`
,
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.danjushijian'
}),
title
:
intl
.
formatMessage
({
id
:
'balance.danjushijian'
}),
key
:
'createTime'
,
dataIndex
:
'createTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
formatTimeString
(
text
,
'YYYY-MM-DD HH:mm'
),
render
:
(
text
:
any
)
=>
formatTimeString
(
text
,
'YYYY-MM-DD HH:mm'
),
width
:
180
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.waibuzhuangtai'
}),
key
:
'
externalState
'
,
dataIndex
:
'
externalState
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
StatusTag
type=
'default'
title=
{
record
.
externalStateName
}
/>
title
:
intl
.
formatMessage
({
id
:
'balance.waibuzhuangtai'
}),
key
:
'
status
'
,
dataIndex
:
'
status
'
,
render
:
(
text
:
any
)
=>
<
StatusTag
type=
'default'
title=
{
text
}
/>
}];
const
_exportFunc
=
()
=>
{
getSettleAccountsBusinessReconciliationTeamworkBuyerReconciliationExport
(
exportParams
)
}
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
// fetchTableData={params => loadingTableData(params)}
rowSelection=
{
selectRow
}
fetchTableData=
{
params
=>
loadingTableData
(
params
)
}
columns=
{
columns
}
currentRef=
{
ref
}
rowKey=
"id"
...
...
@@ -90,7 +100,7 @@ const Search: React.FC = () => {
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'
order
No'
,
'
reconciliation
No'
,
FORM_FILTER_PATH
,
)
}
}
...
...
@@ -108,12 +118,13 @@ const Search: React.FC = () => {
type
:
"object"
,
"x-component"
:
"controllerBtns"
,
},
order
No
:
{
reconciliation
No
:
{
type
:
'string'
,
"x-component"
:
'Search'
,
'x-component-props'
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshuruduizhangdanhao'
}),
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshuruduizhangdanhao'
}),
align
:
'flex-end'
,
allowClear
:
true
,
},
},
}
...
...
@@ -131,42 +142,46 @@ const Search: React.FC = () => {
},
properties
:
{
"
diges
t"
:
{
"
reconciliationAbstrac
t"
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshuruduizhangdanzhaiyao'
}),
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshuruduizhangdanzhaiyao'
}),
allowClear
:
true
,
}
},
"
memberNam
e"
:
{
"
paye
e"
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshurushoukuanfang'
})
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshurushoukuanfang'
}),
allowClear
:
true
,
}
},
"
innerS
tatus"
:
{
"
s
tatus"
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingxuanzezhuangtai'
})
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingxuanzezhuangtai'
}),
allowClear
:
true
,
},
enum
:
[
{
label
:
intl
.
formatMessage
({
id
:
'balance.suoyou'
}),
value
:
''
},
{
label
:
intl
.
formatMessage
({
id
:
'balance.daiqueren'
}),
value
:
1
},
{
label
:
intl
.
formatMessage
({
id
:
'balance.querenbutongguo'
}),
value
:
2
},
{
label
:
intl
.
formatMessage
({
id
:
'balance.daiqingkuan'
}),
value
:
3
},
{
label
:
intl
.
formatMessage
({
id
:
'balance.yiqingkuan'
}),
value
:
4
},
{
label
:
intl
.
formatMessage
({
id
:
'balance.suoyou'
}),
value
:
''
},
{
label
:
intl
.
formatMessage
({
id
:
'balance.daiqueren'
}),
value
:
1
},
{
label
:
intl
.
formatMessage
({
id
:
'balance.querenbutongguo'
}),
value
:
2
},
{
label
:
intl
.
formatMessage
({
id
:
'balance.daiqingkuan'
}),
value
:
3
},
{
label
:
intl
.
formatMessage
({
id
:
'balance.yiqingkuan'
}),
value
:
4
},
]
},
"[
startDate,endDate
]"
:
{
"[
createTimeStart,createTimeEnd
]"
:
{
type
:
'string'
,
"x-component"
:
"dateSelect"
,
"x-component-props"
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'balance.danjushijianquanbu'
}),
placeholder
:
intl
.
formatMessage
({
id
:
'balance.danjushijianquanbu'
}),
allowClear
:
true
,
}
},
submit
:
{
'x-component'
:
'Submit'
,
'x-component-props'
:
{
children
:
intl
.
formatMessage
({
id
:
'balance.chaxun'
}),
children
:
intl
.
formatMessage
({
id
:
'balance.chaxun'
}),
},
},
},
...
...
@@ -177,7 +192,7 @@ const Search: React.FC = () => {
Submit
,
controllerBtns
:
()
=>
(
<
Space
>
<
Button
size=
'middle'
>
{
intl
.
formatMessage
({
id
:
'balance.daochu'
})
}
</
Button
>
<
Button
size=
'middle'
onClick=
{
_exportFunc
}
>
{
intl
.
formatMessage
({
id
:
'balance.daochu'
})
}
</
Button
>
</
Space
>
),
}
}
...
...
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