Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shenshaokai
jinfa-admin
Commits
e2f6196d
Commit
e2f6196d
authored
Aug 26, 2021
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改结算筛选文字描述错误问题
parent
efe491c4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
36 deletions
+36
-36
index.json
...tiesManagement/activePage/fixtures/common/mock/index.json
+0
-1
index.tsx
src/pages/platformSettlement/accountPayable/index.tsx
+36
-35
No files found.
src/pages/marketing/marketingActivitiesManagement/activePage/fixtures/common/mock/index.json
View file @
e2f6196d
...
...
@@ -200,7 +200,6 @@
"suggestProduct"
:{
"sort"
:
23
,
"props"
:
{
"theme"
:
0
,
"visible"
:
true
,
"childrenData"
:[
{
...
...
src/pages/platformSettlement/accountPayable/index.tsx
View file @
e2f6196d
/* eslint-disable react/display-name */
/*
* @Author: Bill
* @Date: 2020-10-20 11:04:07
...
...
@@ -5,25 +6,25 @@
*/
import
React
,
{
useRef
,
useEffect
,
useState
,
useCallback
,
useMemo
}
from
'react'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
Card
,
Button
,
Modal
,
DatePicker
,
Tag
,
Space
}
from
'antd'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
ISchema
,
createFormActions
}
from
'@formily/antd'
;
import
{
StandardTable
}
from
'god'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
;
import
{
schema
}
from
'./schema'
;
import
StatusTag
from
'../components/StatusTag'
;
import
{
PublicApi
}
from
'@/services/api'
import
{
Moment
}
from
'moment'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
{
schema
}
from
'./schema'
;
import
StatusTag
from
'../components/StatusTag'
;
import
useFetchColumns
from
'../hooks/useFetchColumns'
;
import
Voucher
from
'../components/Voucher'
;
import
UploadVoucherModal
from
'../components/UploadVoucherModal'
;
import
{
priceFormat
}
from
'@/utils/numberFomat'
import
useIsExistsBrokerage
from
'../hooks/useIsExistsBrokerage'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
priceFormat
}
from
'@/utils/numberFomat'
;
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
NiceForm
from
'@/components/NiceForm'
;
interface
SearchParams
{
settlementName
?:
string
,
...
...
@@ -50,19 +51,19 @@ const SettlementList = () => {
balanceInfo
,
payVoucherInfo
}
=
useFetchColumns
();
const
{
hasBrokerage
,
filterColumns
}
=
useIsExistsBrokerage
()
const
{
hasBrokerage
,
filterColumns
}
=
useIsExistsBrokerage
()
;
const
[
files
,
setFiles
]
=
useState
<
any
>
([]);
// const [hasBrokerage, setHasBrokerage] = useState(true);
const
ref
=
useRef
<
any
>
({})
const
ref
=
useRef
<
any
>
({})
;
const
fetchListData
=
async
(
params
)
=>
{
const
searchData
=
{
...
params
,
status
:
typeof
params
.
status
==
'undefined'
?
0
:
params
.
status
,
}
const
res
=
await
PublicApi
.
getSettleAccountsPlatformSettlementPagePayableSettlement
(
searchData
)
}
;
const
res
=
await
PublicApi
.
getSettleAccountsPlatformSettlementPagePayableSettlement
(
searchData
)
;
return
res
.
data
;
}
}
;
const
columns
:
ColumnsType
<
any
>
=
[
{
...
...
@@ -74,7 +75,7 @@ const SettlementList = () => {
<
EyePreview
url=
{
url
}
>
{
text
}
</
EyePreview
>
)
)
;
}
},
{
title
:
'结算日期'
,
dataIndex
:
'settlementDate'
},
...
...
@@ -104,51 +105,51 @@ const SettlementList = () => {
{
text
:
'待对账'
,
value
:
1
},
{
text
:
'待付款'
,
value
:
2
},
{
text
:
'待收款'
,
value
:
3
},
{
text
:
'
以
完成'
,
value
:
4
},
{
text
:
'
已
完成'
,
value
:
4
},
],
onFilter
:
(
value
,
record
:
any
)
=>
record
.
status
==
value
,
render
:
(
text
,
record
:
any
)
=>
{
return
(
<
StatusTag
status=
{
record
.
status
}
/>
)
)
;
}
},
{
title
:
'操作'
,
render
:
(
text
,
record
:
any
)
=>
{
if
(
record
.
status
===
1
)
{
return
<
a
onClick=
{
()
=>
handleManualsettlement
(
record
.
id
)
}
>
手动结算
</
a
>
return
<
a
onClick=
{
()
=>
handleManualsettlement
(
record
.
id
)
}
>
手动结算
</
a
>
;
}
if
(
record
.
status
===
2
)
{
return
<
a
onClick=
{
()
=>
handlePay
({
id
:
record
.
id
,
settlementId
:
record
.
memberId
,
roleId
:
record
.
roleId
})
}
>
付款
</
a
>
return
<
a
onClick=
{
()
=>
handlePay
({
id
:
record
.
id
,
settlementId
:
record
.
memberId
,
roleId
:
record
.
roleId
})
}
>
付款
</
a
>
;
}
return
<
a
onClick=
{
()
=>
handleViewPayModal
({
id
:
record
.
id
})
}
>
查看付款凭证
</
a
>
return
<
a
onClick=
{
()
=>
handleViewPayModal
({
id
:
record
.
id
})
}
>
查看付款凭证
</
a
>
;
}
}
]
]
;
/**
*
* @param params 手动结算
*/
const
handleManualsettlement
=
async
(
id
:
number
)
=>
{
const
{
data
,
code
}
=
await
PublicApi
.
postReportSettlementPlatformManualSettlement
({
id
:
id
})
const
{
data
,
code
}
=
await
PublicApi
.
postReportSettlementPlatformManualSettlement
({
id
:
id
})
;
if
(
code
===
1000
)
{
formActions
.
submit
();
}
}
}
;
const
fetchVouchers
=
useCallback
(
async
(
id
:
number
)
=>
{
const
{
code
,
data
}
=
await
PublicApi
.
getSettleAccountsPlatformSettlementGetPayablePayProve
({
id
:
id
.
toString
()})
const
{
code
,
data
}
=
await
PublicApi
.
getSettleAccountsPlatformSettlementGetPayablePayProve
({
id
:
id
.
toString
()})
;
if
(
code
===
1000
)
{
setFiles
(
data
);
}
},
[])
},
[])
;
useEffect
(()
=>
{
if
(
payVoucherInfo
!==
null
)
{
fetchVouchers
(
payVoucherInfo
.
id
);
}
},
[
payVoucherInfo
])
},
[
payVoucherInfo
])
;
/**
* 上传凭证
...
...
@@ -159,20 +160,20 @@ const SettlementList = () => {
.
then
((
data
)
=>
{
if
(
data
.
code
===
1000
)
{
formActions
.
submit
();
params
.
onCancel
()
params
.
onCancel
()
;
}
})
}
})
;
}
;
/**
* 搜索
*/
const
handleSearch
=
(
values
:
SearchParams
)
=>
{
const
format
=
'YYYY-MM-DD'
const
format
=
'YYYY-MM-DD'
;
const
startTime
=
values
.
startTime
?.
format
(
format
);
const
endTime
=
values
.
endTime
?
values
.
endTime
.
endOf
(
"day"
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
""
;
ref
.
current
.
reload
({...
values
,
startTime
,
endTime
});
}
}
;
const
frozenColumn
=
useMemo
(()
=>
filterColumns
(
columns
,
[
"brokerage"
]),
[
filterColumns
,
columns
]);
return
(
<
PageHeaderWrapper
>
...
...
@@ -218,8 +219,8 @@ const SettlementList = () => {
<
Voucher
files=
{
files
}
/>
</
Modal
>
</
PageHeaderWrapper
>
)
}
)
;
}
;
export
default
SettlementList
export
default
SettlementList
;
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